From 3df62c7fa5840bafaae6118ca62647b734b7964b Mon Sep 17 00:00:00 2001
From: Oleksii Shevchuk
Date: Tue, 11 Apr 2017 21:34:45 +0300
Subject: [PATCH] Use config from pupysrv if possible
---
pupy/modules/screenshot.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pupy/modules/screenshot.py b/pupy/modules/screenshot.py
index b5af3c90..777de23f 100644
--- a/pupy/modules/screenshot.py
+++ b/pupy/modules/screenshot.py
@@ -66,7 +66,7 @@ class Screenshoter(PupyModule):
'({}x{})'.format(screen['top'], screen['left'])))
return
- config = PupyConfig()
+ config = self.client.pupsrv.config or PupyConfig()
folder = config.get_folder('screenshots', {'%c': self.client.short_name()})
screenshots, error = rscreenshot.screenshot(args.screen)
@@ -74,7 +74,7 @@ class Screenshoter(PupyModule):
self.error(error)
else:
self.success('number of monitor detected: %s' % str(len(screenshots)))
-
+
for i, screenshot in enumerate(screenshots):
filepath = path.join(folder, str(datetime.datetime.now()).replace(" ","_").replace(":","-")+'-'+str(i)+".png")
with open(filepath, 'w') as out: