Skip to content

Commit 29cf6a5

Browse files
committed
elixir/lib: shorten getDataDir() & getRepoDir()
Signed-off-by: Théo Lebrun <[email protected]>
1 parent 0d2f11b commit 29cf6a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

elixir/lib.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,17 @@ def autoBytes(arg):
196196

197197
def getDataDir():
198198
try:
199-
dir=os.environ['LXR_DATA_DIR']
199+
return os.environ['LXR_DATA_DIR']
200200
except KeyError:
201201
print(sys.argv[0] + ': LXR_DATA_DIR needs to be set')
202202
exit(1)
203-
return dir
204203

205204
def getRepoDir():
206205
try:
207-
dir=os.environ['LXR_REPO_DIR']
206+
return os.environ['LXR_REPO_DIR']
208207
except KeyError:
209208
print(sys.argv[0] + ': LXR_REPO_DIR needs to be set')
210209
exit(1)
211-
return dir
212210

213211
def currentProject():
214212
return os.path.basename(os.path.dirname(getDataDir()))

0 commit comments

Comments
 (0)