Skip to content

Commit

Permalink
Fix logic for detection of Windows OS (#42)
Browse files Browse the repository at this point in the history
Should be `if os.name == 'nt'`, and *not* `if sys.platform == 'nt'`.
Helpful explanation at https://stackoverflow.com/a/11674977/20789.

Signed-off-by: Daniel Lenski <[email protected]>
  • Loading branch information
zepc007 authored and dlenski committed Aug 29, 2024
1 parent c694dc5 commit 9142ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zxing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, message, filename=None):

class BarCodeReader(object):
cls = "com.google.zxing.client.j2se.CommandLineRunner"
classpath_sep = ';' if sys.platform == 'nt' else ':' # https://stackoverflow.com/a/60211688
classpath_sep = ';' if os.name == 'nt' else ':' # https://stackoverflow.com/a/60211688

def __init__(self, classpath=None, java=None):
self.java = java or 'java'
Expand Down

0 comments on commit 9142ab9

Please sign in to comment.