Skip to content

Commit

Permalink
bugfix, logging strings
Browse files Browse the repository at this point in the history
 - missed updating them when converting from msg.log to log.debug
  • Loading branch information
sibson committed May 31, 2013
1 parent 8fd2890 commit 77de663
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions vncdotool/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def mouseDown(self, button):
button: int: [1-n]
"""
log.debug('mouseDown', button)
log.debug('mouseDown %s', button)
self.buttons |= 1 << (button - 1)
self.pointerEvent(self.x, self.y, buttonmask=self.buttons)

Expand All @@ -195,7 +195,7 @@ def mouseUp(self, button):
button: int: [1-n]
"""
log.debug('mouseUp', button)
log.debug('mouseUp %s', button)
self.buttons &= ~(1 << (button - 1))
self.pointerEvent(self.x, self.y, buttonmask=self.buttons)

Expand All @@ -205,14 +205,14 @@ def captureScreen(self, filename):
""" Save the current display to filename
"""
# request screen update
log.debug('captureScreen', filename)
log.debug('captureScreen %s', filename)
self.framebufferUpdateRequest()
self.deferred = Deferred()
self.deferred.addCallback(self._captureSave, filename)
return self.deferred

def _captureSave(self, data, filename):
log.debug('captureDone', filename)
log.debug('captureDone %s', filename)
self.screen.save(filename)

return self
Expand All @@ -224,7 +224,7 @@ def expectScreen(self, filename, maxrms=0):
maxrms: the maximum root mean square between histograms of the
screen and target image
"""
log.debug('expectScreen', filename)
log.debug('expectScreen %s', filename)
self.framebufferUpdateRequest()
self.expected = ImageFactory().open(filename).histogram()
self.deferred = Deferred()
Expand Down Expand Up @@ -252,15 +252,15 @@ def _expectCompare(self, image, maxrms):
def mouseMove(self, x, y):
""" Move the mouse pointer to position (x, y)
"""
log.debug('mouseMove', x, y)
log.debug('mouseMove %d,%d', x, y)
self.x, self.y = x, y
self.pointerEvent(x, y, self.buttons)
return self

def mouseDrag(self, x, y, step=1):
""" Move the mouse point to position (x, y) in increments of step
"""
log.debug('mouseDrag', x, y)
log.debug('mouseDrag %d,%d', x, y)
if x < self.x:
xsteps = [self.x - i for i in xrange(step, self.x - x + 1, step)]
else:
Expand Down
4 changes: 2 additions & 2 deletions vncdotool/rfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def _handleInitial(self):
#~ print "rfb"
maj, min = [int(x) for x in buffer[3:-1].split('.')]
#~ print maj, min
if (maj, min) not in [(3,3), (3,7), (3,8), (4,0)]:
log.msg("wrong protocol version\n")
if (maj, min) not in [(3,3), (3,7), (3,8), (3,889), (4,0)]:
log.msg("wrong protocol version, %s.%s\n", maj, min)
self.transport.loseConnection()
buffer = buffer[12:]
self.transport.write('RFB 003.003\n')
Expand Down

0 comments on commit 77de663

Please sign in to comment.