Skip to content

Commit

Permalink
BF: define var (to None) before it might be assigned
Browse files Browse the repository at this point in the history
Ran into

   UnboundLocalError: local variable ver referenced before assignment

although unclear how/why now since prior run (with a little bit different way to it)
did succeed for that matrix run with LC_ALL set to ru_RU.UTF-8
  • Loading branch information
yarikoptic committed May 22, 2024
1 parent a2f9cf5 commit fb45559
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions datalad/support/external_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def get_rsync_version():
on_linux,
)
if on_linux:
ver = None
dist = get_linux_distribution()[0]
if dist in ['debian', 'ubuntu']:
out = _runner.run(['apt-cache', 'policy', 'rsync'],
Expand Down

0 comments on commit fb45559

Please sign in to comment.