Skip to content

Commit

Permalink
python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hublol committed Dec 26, 2021
1 parent 221b0e9 commit 10f974c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ws3000.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def open_port(self):
# The following is normally not required... could be removed?
try:
usb.util.claim_interface(self.device, self.interface)
except usb.USBError, e:
except usb.USBError as e:
self.closePort()
logerr("Unable to claim USB interface: %s" % e)
raise weewx.WeeWxIOError(e)
Expand Down Expand Up @@ -579,8 +579,7 @@ def default_stanza(self):
"""

def modify_config(self, config_dict):
print """
Changing the schema to include extraTemp and extraHumid colums """
print("""Changing the schema to include extraTemp and extraHumid colums """)
config_dict['DataBindings']['wx_binding']['schema'] = 'user.ws3000Extensions.ws3000Schema'


Expand Down Expand Up @@ -610,7 +609,7 @@ def modify_config(self, config_dict):
(options, args) = parser.parse_args()

if options.version:
print "driver version %s" % DRIVER_VERSION
print("driver version %s" % DRIVER_VERSION)
exit(1)

# if options.debug:
Expand All @@ -620,7 +619,7 @@ def modify_config(self, config_dict):
driver = WS3000()
try:
for p in driver.genLoopPackets():
print p
print(p)
finally:
driver.closePort()
else:
Expand Down

0 comments on commit 10f974c

Please sign in to comment.