Merge pull request #650 from jdouliez/master
fix(#649) : Fix Wrong filename on RDP screenshot issuemain
commit
fcbd406773
|
@ -202,9 +202,9 @@ class rdp(connection):
|
|||
|
||||
if self.conn is not None and self.conn.desktop_buffer_has_data is True:
|
||||
buffer = self.conn.get_desktop_buffer(VIDEO_FORMAT.PIL)
|
||||
filename = os.path.expanduser('~/.cme/screenshots/{}_{}_{}'.format(self.hostname, self.host, datetime.now().strftime("%Y-%m-%d_%H%M%S")))
|
||||
filename = os.path.expanduser('~/.cme/screenshots/{}_{}_{}.png'.format(self.hostname, self.host, datetime.now().strftime("%Y-%m-%d_%H%M%S")))
|
||||
buffer.save(filename,'png')
|
||||
self.logger.highlight("Screenshot saved {}".format(filename + ".png"))
|
||||
self.logger.highlight("Screenshot saved {}".format(filename))
|
||||
|
||||
def screenshot(self):
|
||||
asyncio.run(self.screen())
|
||||
|
|
Loading…
Reference in New Issue