Skip to content

Commit

Permalink
Allow execution from a development environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
j committed Sep 28, 2024
1 parent 1b2589b commit fdc5ef8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qrcode/console_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def main(args=None):
if args is None:
args = sys.argv[1:]

version = metadata.version("qrcode")
try:
version = metadata.version("qrcode")
except metadata.PackageNotFoundError:
version = 'development'

parser = optparse.OptionParser(usage=(__doc__ or "").strip(), version=version)

# Wrap parser.error in a typed NoReturn method for better typing.
Expand Down

0 comments on commit fdc5ef8

Please sign in to comment.