Kaydet (Commit) 0902a9b9 authored tarafından Your Name's avatar Your Name

version 1.4.1

üst 1b19999c
#inary config file
...@@ -21,7 +21,7 @@ import logging.handlers ...@@ -21,7 +21,7 @@ import logging.handlers
import os import os
import sys import sys
__version__ = "1.4" __version__ = "1.4.1"
__all__ = ['api', 'configfile', 'db', 'util', '_cleanup'] __all__ = ['api', 'configfile', 'db', 'util', '_cleanup']
...@@ -36,12 +36,12 @@ MIMEFILE_DIR = "/usr/share/mime/packages" ...@@ -36,12 +36,12 @@ MIMEFILE_DIR = "/usr/share/mime/packages"
TMPFILES_DIR = "/usr/lib/tmpfiles.d" TMPFILES_DIR = "/usr/lib/tmpfiles.d"
#config file #config file
if not os.path.isfile(".config"): if os.path.isfile(".config"):
print("No config file found. You must run ./configure first.") cfg=open(".config","r").readlines()
def getConfig(name=""): def getConfig(name=""):
if not os.path.isfile(".config"):
return True
for line in cfg: for line in cfg:
if name in line: if name in line:
return "y" in line.split("=")[1] return "y" in line.split("=")[1]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment