1
0
Fork 0

Other adjustments (formatting, debug) + update cache

This commit is contained in:
Luca Beltrame 2016-09-18 01:01:42 +02:00
parent cfff1ba291
commit 74767c544d
3 changed files with 7 additions and 4 deletions

View file

@ -9,8 +9,6 @@ import pickle
import git
import sarge
logging.basicConfig(format='%(levelname)s:%(message)s',
level=logging.INFO)
class GitHashCache:
@ -120,9 +118,14 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument("repository", help="OBS repository to use")
parser.add_argument("mapping_file", help="KDE:OBS repository mapping file")
parser.add_argument("--debug", help="Show debugging output", action="store_true")
options = parser.parse_args()
level = logging.INFO if not options.debug else logging.DEBUG
logging.basicConfig(format='%(levelname)s:%(message)s',
level=level)
cache_file = Path.home() / ".local/share/obs_{}_cache".format(options.repository.replace(":", "_"))
cache_file = str(cache_file)