Skip to content
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

Merged
merged 3 commits into from Jan 17, 2015

Conversation

MaZderMind
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) when pulling f9a6cc2 on MaZderMind:python-cleanup-controller into a96b423 on timvideos:master.

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling f9a6cc2 on MaZderMind:python-cleanup-controller into a96b423 on timvideos:master.

@@ -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" % (
Copy link
Member

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
@MaZderMind
Copy link
Author

I'm absolutely with you. The controller should not print to stdout anyway.

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.20% when pulling a84e935 on MaZderMind:python-cleanup-controller into a96b423 on timvideos:master.

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:
Copy link
Member

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):

@mithro
Copy link
Member

mithro commented Jan 17, 2015

Looks like landscape actually picked up on this "code smell" -> https://landscape.io/diff/81447

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 3ac6a1a on MaZderMind:python-cleanup-controller into a96b423 on timvideos:master.

mithro added a commit that referenced this pull request Jan 17, 2015
@mithro mithro merged commit 10aa4d0 into timvideos:master Jan 17, 2015
@MaZderMind MaZderMind deleted the python-cleanup-controller branch January 18, 2015 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants