diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:07:33 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:07:33 +0200 |
commit | 730b160e28d711fad96e6a61070e374ad0966566 (patch) | |
tree | fe3f8cf4161de8f93cddf29ea49464b493083e2b /pyload/utils/pylgettext.py | |
parent | Spare code cosmetics (1) (diff) | |
download | pyload-730b160e28d711fad96e6a61070e374ad0966566.tar.xz |
Spare code cosmetics (2)
Diffstat (limited to 'pyload/utils/pylgettext.py')
-rw-r--r-- | pyload/utils/pylgettext.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/pyload/utils/pylgettext.py b/pyload/utils/pylgettext.py index 0e3ebad80..1f31cf42d 100644 --- a/pyload/utils/pylgettext.py +++ b/pyload/utils/pylgettext.py @@ -6,12 +6,10 @@ _searchdirs = None origfind = find + def setpaths(pathlist): global _searchdirs - if isinstance(pathlist, list): - _searchdirs = pathlist - else: - _searchdirs = list(pathlist) + _searchdirs = pathlist if isinstance(pathlist, list) else list(pathlist) def addpath(path): @@ -32,8 +30,7 @@ def delpath(path): def clearpath(): global _searchdirs - if _searchdirs is not None: - _searchdirs = None + _searchdirs = None def find(domain, localedir=None, languages=None, all=False): @@ -51,8 +48,7 @@ def find(domain, localedir=None, languages=None, all=False): results = filter(lambda x: x is not None, results) if len(results) == 0: return None - else: - return results[0] + return results[0] else: return results |