Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-02-15 20:05:01 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-02-15 20:05:01 +0400
commit3c6690941b56e9af732f4dcf5a95435be0c2794e (patch)
treea5634d5f3792b582f7be4b7d4bd53c7806b957ec /misc
parentda7e84e50a4f17d5e4ce81badde2cdb1b0d8b084 (diff)
Fixes #4670, use popen in import_logs.py to run updatetokenfile.php instead of check_output.
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/log-analytics/import_logs.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index a31d724226..8e380ba4fa 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -600,11 +600,16 @@ class Configuration(object):
'../../misc/cron/updatetoken.php'),
)
- process = "php " + updatetokenfile
+ command = ['php', updatetokenfile]
if self.options.enable_testmode:
- process = process + " --testmode"
+ command.append('--testmode')
- filename = subprocess.check_output(process, shell=True);
+ process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ [stdout, stderr] = process.communicate()
+ if process.returncode != 0:
+ fatal_error("misc/cron/updatetoken.php failed: " + stderr)
+
+ filename = stdout
credentials = open(filename, 'r').readline()
credentials = credentials.split('\t')
return credentials[1]