Skip to content

Commit 9142ab9

Browse files
zepc007dlenski
authored andcommitted
Fix logic for detection of Windows OS (#42)
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 <dlenski@gmail.com>
1 parent c694dc5 commit 9142ab9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zxing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, message, filename=None):
4242

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

4747
def __init__(self, classpath=None, java=None):
4848
self.java = java or 'java'

0 commit comments

Comments
 (0)