sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54247
[Bug 1864265] Re: Code example for Settings.getOS() contains error
** Changed in: sikuli
Status: New => Fix Committed
** Changed in: sikuli
Importance: Undecided => Critical
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 2.0.4
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1864265
Title:
Code example for Settings.getOS() contains error
Status in Sikuli:
Fix Committed
Bug description:
<https://sikulix-2014.readthedocs.io/en/latest/globals.html#Settings.getOS>
provides two (similar) examples. The former works fine but the latter
does not.
myOS = Settings.getOS()
if myOS == "MAC" or myOS.startswith("M"):
print "Mac " + myVer # e.g., Mac 10.6.3
else:
print "Sorry, not a Mac"
The variable myOS is just an int; comparing with str "MAC" does not make sense and calling startswith causes AttributeError.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1864265/+subscriptions
References