Skip to content

Commit

Permalink
Handle failure to derive image mode internally by calling `setPixelFo…
Browse files Browse the repository at this point in the history
…rmat`
  • Loading branch information
agfor committed Jan 16, 2018
1 parent f2aa856 commit f25fedc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions vncdotool/client.py
Expand Up @@ -348,10 +348,8 @@ def setImageMode(self):
for offset, color in zip(offsets, "RGB"):
pixel[offset] = color
self.image_mode = "".join(pixel)

return True
else:
return False
self.setPixelFormat()

#
# base customizations
Expand All @@ -364,9 +362,7 @@ def vncRequestPassword(self):
self.sendPassword(self.factory.password)

def vncConnectionMade(self):
if not self.setImageMode():
self.setPixelFormat()

self.setImageMode()
encodings = [self.encoding]
if self.factory.pseudocursor or self.factory.nocursor:
encodings.append(rfb.PSEUDO_CURSOR_ENCODING)
Expand Down

0 comments on commit f25fedc

Please sign in to comment.