projects
/
gamesguru
/
ffpass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d6aa3
)
modify profile selection heuristic
author
louisabraham
<louis.abraham@yahoo.fr>
Fri, 31 May 2019 07:53:05 +0000
(09:53 +0200)
committer
louisabraham
<louis.abraham@yahoo.fr>
Fri, 31 May 2019 07:53:05 +0000
(09:53 +0200)
ffpass/__init__.py
patch
|
blob
|
history
diff --git
a/ffpass/__init__.py
b/ffpass/__init__.py
index ddba1c0c8839bec99094cf9710e9dda88593e6c8..bf8ede8dd0fb1d116949d3b0d9034c1697c2c9e3 100644
(file)
--- a/
ffpass/__init__.py
+++ b/
ffpass/__init__.py
@@
-223,8
+223,9
@@
def guessDir():
path = Path(dirs[sys.platform]).expanduser()
config = configparser.ConfigParser()
config.read(path / "profiles.ini")
- if len(config.sections()) == 2:
- profile = config[config.sections()[1]]
+ profiles = [s for s in config.sections() if "Path" in config[s]]
+ if len(profiles) == 1:
+ profile = config[profiles[0]]
ans = path / profile["Path"]
if args.verbose:
print("Using profile:", ans, file=sys.stderr)