aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/Measure_Shoulders.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 06:43:49 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 06:43:58 +0100
commita62e05c9564045044df734fd3723b3f665ad91ae (patch)
tree5a9e1570362fe9a47fe581c292f3bd84f6fd3e82 /dpd/src/Measure_Shoulders.py
parentbf53849fba5796d1b98254a7eeab575a50ae7996 (diff)
downloaddabmod-a62e05c9564045044df734fd3723b3f665ad91ae.tar.gz
dabmod-a62e05c9564045044df734fd3723b3f665ad91ae.tar.bz2
dabmod-a62e05c9564045044df734fd3723b3f665ad91ae.zip
DPD: Make logging to file optional in all modules, simplify apply_adapt_dumps
Diffstat (limited to 'dpd/src/Measure_Shoulders.py')
-rw-r--r--dpd/src/Measure_Shoulders.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/dpd/src/Measure_Shoulders.py b/dpd/src/Measure_Shoulders.py
index c733dfd..2249ac6 100644
--- a/dpd/src/Measure_Shoulders.py
+++ b/dpd/src/Measure_Shoulders.py
@@ -10,7 +10,10 @@ import os
import logging
import multiprocessing
-logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
+try:
+ logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
+except AttributeError:
+ logging_path = None
import numpy as np
import matplotlib.pyplot as plt
@@ -79,6 +82,9 @@ class Measure_Shoulders:
self.plot = c.MS_plot
def _plot(self, signal):
+ if logging_path is None:
+ return
+
dt = datetime.datetime.now().isoformat()
fig_path = logging_path + "/" + dt + "_sync_subsample_aligned.svg"