-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary prints and String-Casts #162
Remove unnecessary prints and String-Casts #162
Conversation
@@ -295,8 +294,8 @@ def adjust_pip(self, xpos, ypos, width, height): | |||
try: | |||
conn = self.connection.adjust_pip(xpos, ypos, width, height) | |||
res = conn.unpack()[0] | |||
print "adjust pip xpos:%s ypos:%s w:%s h:%s" % ( | |||
str(xpos), str(ypos), str(width), str(height)) | |||
print "adjust pip xpos:%u ypos:%u w:%u h:%u" % ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing these should actually be %i - but these prints should probably be removed anyway - see https://github.com/timvideos/gst-switch/issues/159
The controller should not print to stdout anyway
I'm absolutely with you. The controller should not print to stdout anyway. |
|
print "Click video: xpos:%s ypos:%s width:%s height:%s" % ( | ||
str(xpos), str(ypos), str(width), str(height)) | ||
else: | ||
if not res is True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you should use;
if res is not True:
Coming from other languages you might expect the above to be equivalent to the following, but it instead does what the english says;
if res is (not True):
Looks like landscape actually picked up on this "code smell" -> https://landscape.io/diff/81447 |
No description provided.