From 323ab0dfa25009b0800d3b8a640e1f1dc2bb19bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20B=C3=BCchau?= Date: Mon, 28 Nov 2016 13:32:07 +0100 Subject: [PATCH] let the service check if device is already monitored - update languages --- README.md | 2 + debian/changelog | 6 + .../co2monitor/python/co2monitor/device.py | 2 +- .../co2monitor/python/co2monitor/service.py | 73 ++++++++--- usr/lib/co2monitor/python/co2monitor/utils.py | 6 +- .../lang/de/LC_MESSAGES/co2monitor.po | 117 +++++++++++------- .../lang/fr/LC_MESSAGES/co2monitor.po | 117 +++++++++++------- 7 files changed, 211 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 9ea5c5f..113c45c 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,5 @@ The folder structure (```etc```,```lib```,```usr```,```var```) is based on the [ - Hendryk Plötz on [hackaday.io](https://hackaday.io/project/5301-reverse-engineering-a-low-cost-usb-co-monitor) for the device interaction - Mike Kazantsev on his blog on [fraggod.net](http://blog.fraggod.net/2012/06/16/proper-ish-way-to-start-long-running-systemd-service-on-udev-event-device-hotplug.html) for the systemd integration - Ascot on [StackOverflow.com](http://stackoverflow.com/a/26457317/5433146) for a workaround on ```signal.signal(signal, handler)``` when using a ```GLib.MainLoop``` +- don_crissti on [StackOveflow.com](http://unix.stackexchange.com/a/203678) for + getting a list of dbus objects diff --git a/debian/changelog b/debian/changelog index 0509416..c436ea0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +co2monitor (0.0.10) unstable; urgency=medium + + * better hotplug handling + + -- Yann Büchau Mon, 28 Nov 2016 11:24:14 +0100 + co2monitor (0.0.9) unstable; urgency=medium * fix multiple co2monitor-service invocation bug diff --git a/usr/lib/co2monitor/python/co2monitor/device.py b/usr/lib/co2monitor/python/co2monitor/device.py index fbaab6a..b45bdb5 100644 --- a/usr/lib/co2monitor/python/co2monitor/device.py +++ b/usr/lib/co2monitor/python/co2monitor/device.py @@ -28,7 +28,7 @@ def device(self): def device(self, device): try: if not os.path.exists(device): - raise TypeError(_("Device file '{}' does not exist.").format( + raise OSError(_("Device file '{}' does not exist.").format( device)) except: raise # set the new device file diff --git a/usr/lib/co2monitor/python/co2monitor/service.py b/usr/lib/co2monitor/python/co2monitor/service.py index e9e818e..feb1a21 100644 --- a/usr/lib/co2monitor/python/co2monitor/service.py +++ b/usr/lib/co2monitor/python/co2monitor/service.py @@ -2,6 +2,7 @@ import dbus import dbus.service import dbus.mainloop.glib +from xml.etree import ElementTree import logging import configparser @@ -43,9 +44,9 @@ def __init__(self): self.loop = GLib.MainLoop() # create mainloop - systembus = dbus.SystemBus() # the system bus - systembus.request_name(CO2MONITOR_BUSNAME) # request the bus name - bus_name = dbus.service.BusName(CO2MONITOR_BUSNAME, systembus) # create bus name + self.systembus = dbus.SystemBus() # the system bus + self.systembus.request_name(CO2MONITOR_BUSNAME) # request the bus name + bus_name = dbus.service.BusName(CO2MONITOR_BUSNAME, self.systembus) # create bus name # register the object on the bus name dbus.service.Object.__init__(self, bus_name, CO2MONITOR_OBJECTPATH) @@ -89,19 +90,55 @@ def run(self): self.loop.run() self.logger.info(_("Service stopped")) - @dbus.service.method(CO2MONITOR_INTERFACE, in_signature='s', out_signature='') + # get a list of exported objects under a path (only one layer deep) + # thanks to don_crissti on http://unix.stackexchange.com/a/203678 + def get_monitored_devices_objects(self): + res = [] + # iface = dbus.Interface(self, 'org.freedesktop.DBus.Introspectable') + xml_string = self.Introspect(CO2MONITOR_OBJECTPATH,self.connection) + for child in ElementTree.fromstring(xml_string): + if child.tag == 'node': + new_path = '/'.join((CO2MONITOR_OBJECTPATH, child.attrib['name'])) + res.append(new_path) + return res + + @dbus.service.method(CO2MONITOR_INTERFACE, + in_signature='s', out_signature='b') def start_device_logging(self, devicefile): self.logger.info(_("received request to start logging on device {}").format( devicefile)) - thread = LogThread(devicefile = devicefile) # logger object - self.logger.info(_("starting logging thread for device {}").format( - devicefile)) - # same logger as service - thread.set_logger(self.logger) - # same config as service - thread.set_config(self.config) - thread.daemon = True # let this thread be a daemon thread - thread.start() + # create the object path name on the bus name + objectpath = "/".join([CO2MONITOR_OBJECTPATH, + utils.devicefile2objectname(devicefile)]) + # check if device is already monitored + monitored_devices = self.get_monitored_devices_objects() + if objectpath in monitored_devices: + self.logger.warning(" ".join([ + _("There is already a logging thread for device {}."), + _("This is odd... I better do nothing.") + ]).format(devicefile)) + return False + else: + try: + thread = LogThread(devicefile = devicefile) # logger object + self.logger.info(_("starting logging thread for device {}").format( + devicefile)) + # same logger as service + thread.set_logger(self.logger) + # same config as service + thread.set_config(self.config) + thread.daemon = True # let this thread be a daemon thread + thread.start() + except OSError: + self.logger.critical(_("Could not access the device file '{}'." + ).format(devicefile)) + return False + except: + self.logger.critical(_( + "Something went wrong with device file '{}'." + ).format(devicefile)) + return False + return True @dbus.service.method(CO2MONITOR_INTERFACE, in_signature='', out_signature='s') @@ -136,9 +173,9 @@ def __init__(self, devicefile): dbus.mainloop.glib.threads_init() GLib.threads_init() - systembus = dbus.SystemBus() # the system bus - systembus.request_name(CO2MONITOR_BUSNAME) # request the bus name - bus_name = dbus.service.BusName(CO2MONITOR_BUSNAME, systembus) # create bus name + self.systembus = dbus.SystemBus() # the system bus + self.systembus.request_name(CO2MONITOR_BUSNAME) # request the bus name + bus_name = dbus.service.BusName(CO2MONITOR_BUSNAME, self.systembus) # create bus name self.devicefile = devicefile @@ -147,7 +184,7 @@ def __init__(self, devicefile): # register the object on the bus name objectpath = "/".join([CO2MONITOR_OBJECTPATH, - os.path.basename(self.devicefile)]) + utils.devicefile2objectname(self.devicefile)]) dbus.service.Object.__init__(self, bus_name, objectpath) self.update_status(_("idle")) threading.Thread.__init__(self) @@ -198,6 +235,8 @@ def quit(self): self.logger.debug(_("Shutting down logging thread of device {}").format( self.devicefile)) self.remove_from_connection() + self.logger.debug(_("logging thread for device {} was shut down properly.").format( + self.devicefile)) sys.exit() # logloop diff --git a/usr/lib/co2monitor/python/co2monitor/utils.py b/usr/lib/co2monitor/python/co2monitor/utils.py index b6f6c43..fc5c6ed 100644 --- a/usr/lib/co2monitor/python/co2monitor/utils.py +++ b/usr/lib/co2monitor/python/co2monitor/utils.py @@ -19,8 +19,7 @@ def splitpath(path): # convert a device file path to a DBus object name last part def devicefile2objectname(devicefile): - p = [x.replace("-","--") for x in splitpath(devicefile)] - return "-".join(p) + return "_".join(splitpath(os.path.realpath(devicefile))) # # convert a DBus object name last part to a device file path @@ -45,3 +44,6 @@ def devicefile2objectname(devicefile): # c = True # print("---------------") # return os.path.join(*res) + + + diff --git a/usr/share/co2monitor/lang/de/LC_MESSAGES/co2monitor.po b/usr/share/co2monitor/lang/de/LC_MESSAGES/co2monitor.po index 0a521bb..6354b65 100644 --- a/usr/share/co2monitor/lang/de/LC_MESSAGES/co2monitor.po +++ b/usr/share/co2monitor/lang/de/LC_MESSAGES/co2monitor.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-23 17:30+0100\n" -"PO-Revision-Date: 2016-11-23 17:36+0100\n" +"POT-Creation-Date: 2016-11-28 13:54+0100\n" +"PO-Revision-Date: 2016-11-28 14:04+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -18,6 +18,22 @@ msgstr "" "X-Generator: Poedit 1.8.7.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: usr/lib/co2monitor/python/co2monitor/gui.py:76 +msgid "Welcome to Co2monitor!" +msgstr "Willkommen bei Co2monitor!" + +#: usr/lib/co2monitor/python/co2monitor/gui.py:84 +msgid "Starting GLib main loop..." +msgstr "starte GLib Hautpschleife..." + +#: usr/lib/co2monitor/python/co2monitor/gui.py:86 +msgid "GLib main loop ended." +msgstr "GLib Hauptschleife beendet." + +#: usr/lib/co2monitor/python/co2monitor/gui.py:90 +msgid "Received quitting signal." +msgstr "Anhaltesignal erhalten." + #: usr/lib/co2monitor/python/co2monitor/device.py:31 msgid "Device file '{}' does not exist." msgstr "Gerätedatei '{}' existiert nicht." @@ -58,133 +74,138 @@ msgstr "Versuche Neuverbindung..." msgid "Could not reconnect. Aborting." msgstr "Konnte nicht wiederverbinden. Abbruch." -#: usr/lib/co2monitor/python/co2monitor/gui.py:76 -msgid "Welcome to Co2monitor!" -msgstr "Willkommen bei Co2monitor!" - -#: usr/lib/co2monitor/python/co2monitor/gui.py:84 -msgid "Starting GLib main loop..." -msgstr "starte GLib Hautpschleife..." - -#: usr/lib/co2monitor/python/co2monitor/gui.py:86 -msgid "GLib main loop ended." -msgstr "GLib Hauptschleife beendet." - -#: usr/lib/co2monitor/python/co2monitor/gui.py:90 -msgid "Received quitting signal." -msgstr "Anhaltesignal erhalten." - -#: usr/lib/co2monitor/python/co2monitor/service.py:82 +#: usr/lib/co2monitor/python/co2monitor/service.py:84 msgid "received stop signal {}," msgstr "Anhaltesignal {} erhalten," -#: usr/lib/co2monitor/python/co2monitor/service.py:83 +#: usr/lib/co2monitor/python/co2monitor/service.py:85 msgid "will terminate soon..." msgstr "werde bald anhalten..." -#: usr/lib/co2monitor/python/co2monitor/service.py:87 +#: usr/lib/co2monitor/python/co2monitor/service.py:89 msgid "Service running..." msgstr "Service läuft..." -#: usr/lib/co2monitor/python/co2monitor/service.py:89 +#: usr/lib/co2monitor/python/co2monitor/service.py:91 msgid "Service stopped" msgstr "Service beendet" -#: usr/lib/co2monitor/python/co2monitor/service.py:93 +#: usr/lib/co2monitor/python/co2monitor/service.py:108 msgid "received request to start logging on device {}" msgstr "Anweisung erhalten, Daten von Gerät {} zu loggen" -#: usr/lib/co2monitor/python/co2monitor/service.py:96 +#: usr/lib/co2monitor/python/co2monitor/service.py:117 +msgid "There is already a logging thread for device {}." +msgstr "Es läuft bereits ein Datenaufzeichnungsthread für Gerät {}." + +#: usr/lib/co2monitor/python/co2monitor/service.py:118 +msgid "This is odd... I better do nothing." +msgstr "Das ist seltsam... Ich tue besser nichts." + +#: usr/lib/co2monitor/python/co2monitor/service.py:124 msgid "starting logging thread for device {}" msgstr "starte Datenaufzeichnungs-Thread auf Gerät {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:109 +#: usr/lib/co2monitor/python/co2monitor/service.py:133 +msgid "Could not access the device file '{}'." +msgstr "Konnte Gerätedatei '{}' nicht erreichen." + +#: usr/lib/co2monitor/python/co2monitor/service.py:138 +msgid "Something went wrong with device file '{}'." +msgstr "Etwas hat mit Gerätedatei '{}' nicht funktioniert." + +#: usr/lib/co2monitor/python/co2monitor/service.py:147 msgid "running" msgstr "aktiv" -#: usr/lib/co2monitor/python/co2monitor/service.py:111 +#: usr/lib/co2monitor/python/co2monitor/service.py:149 msgid "stopped" msgstr "inaktiv" -#: usr/lib/co2monitor/python/co2monitor/service.py:116 +#: usr/lib/co2monitor/python/co2monitor/service.py:154 msgid "stopping co2monitor..." msgstr "stoppe co2monitor..." -#: usr/lib/co2monitor/python/co2monitor/service.py:118 +#: usr/lib/co2monitor/python/co2monitor/service.py:156 msgid "stopped co2monitor" msgstr "co2monitor angehalten" -#: usr/lib/co2monitor/python/co2monitor/service.py:151 +#: usr/lib/co2monitor/python/co2monitor/service.py:189 msgid "idle" msgstr "untätig" -#: usr/lib/co2monitor/python/co2monitor/service.py:188 +#: usr/lib/co2monitor/python/co2monitor/service.py:226 msgid "Request to stop logging on device {} - will terminate soon..." msgstr "" "Anfrage, die Datenaufzeichnung auf Gerät {} zu beenden - werde bald " "anhalten..." -#: usr/lib/co2monitor/python/co2monitor/service.py:197 +#: usr/lib/co2monitor/python/co2monitor/service.py:235 msgid "Shutting down logging thread of device {}" msgstr "Fahre Datenaufzeichnungs-Thread auf Gerät {} herunter" -#: usr/lib/co2monitor/python/co2monitor/service.py:204 +#: usr/lib/co2monitor/python/co2monitor/service.py:238 +msgid "logging thread for device {} was shut down properly." +msgstr "" +"Datenaufzeichnungsthread für Gerät {} wurde ordentlich heruntergefahren." + +#: usr/lib/co2monitor/python/co2monitor/service.py:244 msgid "Starting data logging on device {}" msgstr "Beginne Datenaufzeichnung auf Gerät {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:208 +#: usr/lib/co2monitor/python/co2monitor/service.py:248 msgid "creating data directory" msgstr "erstelle Datenordner" -#: usr/lib/co2monitor/python/co2monitor/service.py:211 +#: usr/lib/co2monitor/python/co2monitor/service.py:251 msgid "created data directory" msgstr "Datenordner erstellt" -#: usr/lib/co2monitor/python/co2monitor/service.py:225 +#: usr/lib/co2monitor/python/co2monitor/service.py:265 msgid "device warmup" msgstr "Geräteaufwärmung" -#: usr/lib/co2monitor/python/co2monitor/service.py:227 +#: usr/lib/co2monitor/python/co2monitor/service.py:267 msgid "giving the device another {} seconds of warmup time..." msgstr "warte noch {} Sekunden, bis das Gerät bereit ist..." -#: usr/lib/co2monitor/python/co2monitor/service.py:233 +#: usr/lib/co2monitor/python/co2monitor/service.py:273 msgid "opening data file" msgstr "öffne Aufzeichnungsdatei" -#: usr/lib/co2monitor/python/co2monitor/service.py:235 +#: usr/lib/co2monitor/python/co2monitor/service.py:275 msgid "opened data file" msgstr "Aufzeichnungsdatei geöffnet" -#: usr/lib/co2monitor/python/co2monitor/service.py:236 +#: usr/lib/co2monitor/python/co2monitor/service.py:276 msgid "opened {} for data logging." msgstr "Datei {} zur Datenaufzeichnung geöffnet." -#: usr/lib/co2monitor/python/co2monitor/service.py:240 +#: usr/lib/co2monitor/python/co2monitor/service.py:280 msgid "writing header to file" msgstr "Schreibe Kopfzeile in Aufzeichnungsdatei" -#: usr/lib/co2monitor/python/co2monitor/service.py:245 +#: usr/lib/co2monitor/python/co2monitor/service.py:285 msgid "reading from device" msgstr "lese vom Gerät" -#: usr/lib/co2monitor/python/co2monitor/service.py:249 +#: usr/lib/co2monitor/python/co2monitor/service.py:289 msgid "postprocessing raw data" msgstr "Nachbearbeitung der Rohdaten" -#: usr/lib/co2monitor/python/co2monitor/service.py:272 +#: usr/lib/co2monitor/python/co2monitor/service.py:312 msgid "writing data to file" msgstr "schreibe Daten in Aufzeichnungsdatei" -#: usr/lib/co2monitor/python/co2monitor/service.py:283 +#: usr/lib/co2monitor/python/co2monitor/service.py:323 msgid "stopped logging." msgstr "Datenaufzeichnung beendet." -#: usr/lib/co2monitor/python/co2monitor/service.py:284 +#: usr/lib/co2monitor/python/co2monitor/service.py:324 msgid "closed data logging file '{}'" msgstr "Datenaufzeichnungsdatei '{}' geschlossen" -#: usr/lib/co2monitor/python/co2monitor/service.py:286 +#: usr/lib/co2monitor/python/co2monitor/service.py:326 msgid "Stopped data logging on device {}" msgstr "beende Datenaufzeichnung auf Gerät {}" @@ -250,6 +271,10 @@ msgstr "DEVNAME Umgebungsvariable: {}" msgid "DEVNAME environment variable '{}' is a non-existant file. Aborting." msgstr "DEVNAME Umgebungsvariable '{}' ist keine existierende Datei. Abbruch." +#, fuzzy +#~ msgid "getting monitored_devices..." +#~ msgstr "stoppe co2monitor..." + #~ msgid "co2monitor was started by {}" #~ msgstr "co2monitor wurde von {} gestartet" diff --git a/usr/share/co2monitor/lang/fr/LC_MESSAGES/co2monitor.po b/usr/share/co2monitor/lang/fr/LC_MESSAGES/co2monitor.po index a88e62e..40d0964 100644 --- a/usr/share/co2monitor/lang/fr/LC_MESSAGES/co2monitor.po +++ b/usr/share/co2monitor/lang/fr/LC_MESSAGES/co2monitor.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-23 17:30+0100\n" -"PO-Revision-Date: 2016-11-23 17:37+0100\n" +"POT-Creation-Date: 2016-11-28 13:54+0100\n" +"PO-Revision-Date: 2016-11-28 14:02+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" @@ -18,6 +18,22 @@ msgstr "" "X-Generator: Poedit 1.8.7.1\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: usr/lib/co2monitor/python/co2monitor/gui.py:76 +msgid "Welcome to Co2monitor!" +msgstr "Bienvenue à Co2monitor!" + +#: usr/lib/co2monitor/python/co2monitor/gui.py:84 +msgid "Starting GLib main loop..." +msgstr "lance GLib boucle... " + +#: usr/lib/co2monitor/python/co2monitor/gui.py:86 +msgid "GLib main loop ended." +msgstr "GLib boucle terminé." + +#: usr/lib/co2monitor/python/co2monitor/gui.py:90 +msgid "Received quitting signal." +msgstr "reçu signal de interruption." + #: usr/lib/co2monitor/python/co2monitor/device.py:31 msgid "Device file '{}' does not exist." msgstr "Fichier d'appareil '{}' n'existe pas." @@ -58,132 +74,137 @@ msgstr "Essai de reconnexion..." msgid "Could not reconnect. Aborting." msgstr "Ne pourrais pas reconnecter. Interruption." -#: usr/lib/co2monitor/python/co2monitor/gui.py:76 -msgid "Welcome to Co2monitor!" -msgstr "Bienvenue à Co2monitor!" - -#: usr/lib/co2monitor/python/co2monitor/gui.py:84 -msgid "Starting GLib main loop..." -msgstr "lance GLib boucle... " - -#: usr/lib/co2monitor/python/co2monitor/gui.py:86 -msgid "GLib main loop ended." -msgstr "GLib boucle terminé." - -#: usr/lib/co2monitor/python/co2monitor/gui.py:90 -msgid "Received quitting signal." -msgstr "reçu signal de interruption." - -#: usr/lib/co2monitor/python/co2monitor/service.py:82 +#: usr/lib/co2monitor/python/co2monitor/service.py:84 msgid "received stop signal {}," msgstr "reçu signal stop {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:83 +#: usr/lib/co2monitor/python/co2monitor/service.py:85 msgid "will terminate soon..." msgstr "ja vais arrêter bientôt..." -#: usr/lib/co2monitor/python/co2monitor/service.py:87 +#: usr/lib/co2monitor/python/co2monitor/service.py:89 msgid "Service running..." msgstr "Le service marche..." -#: usr/lib/co2monitor/python/co2monitor/service.py:89 +#: usr/lib/co2monitor/python/co2monitor/service.py:91 msgid "Service stopped" msgstr "Le service a terminé." -#: usr/lib/co2monitor/python/co2monitor/service.py:93 +#: usr/lib/co2monitor/python/co2monitor/service.py:108 msgid "received request to start logging on device {}" msgstr "reçu ordre d'enregistrement pour appareil {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:96 +#: usr/lib/co2monitor/python/co2monitor/service.py:117 +msgid "There is already a logging thread for device {}." +msgstr "Il y a déja un thread d'enregistrement pour l'appareil {}." + +#: usr/lib/co2monitor/python/co2monitor/service.py:118 +msgid "This is odd... I better do nothing." +msgstr "C'est bizarre... Je ne vais rien faire." + +#: usr/lib/co2monitor/python/co2monitor/service.py:124 msgid "starting logging thread for device {}" msgstr "commence thread d'enregistrement pur appareil {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:109 +#: usr/lib/co2monitor/python/co2monitor/service.py:133 +msgid "Could not access the device file '{}'." +msgstr "Ne pourrais pas avoid accès à l'appareil '{}'" + +#: usr/lib/co2monitor/python/co2monitor/service.py:138 +msgid "Something went wrong with device file '{}'." +msgstr "Quelque chose de bizarre se passait avec l'appareil '{}'" + +#: usr/lib/co2monitor/python/co2monitor/service.py:147 msgid "running" msgstr "en marchant" -#: usr/lib/co2monitor/python/co2monitor/service.py:111 +#: usr/lib/co2monitor/python/co2monitor/service.py:149 msgid "stopped" msgstr "arrêté" -#: usr/lib/co2monitor/python/co2monitor/service.py:116 +#: usr/lib/co2monitor/python/co2monitor/service.py:154 msgid "stopping co2monitor..." msgstr "en train d'arrêter co2monitor..." -#: usr/lib/co2monitor/python/co2monitor/service.py:118 +#: usr/lib/co2monitor/python/co2monitor/service.py:156 msgid "stopped co2monitor" msgstr "co2monitor arrêté" -#: usr/lib/co2monitor/python/co2monitor/service.py:151 +#: usr/lib/co2monitor/python/co2monitor/service.py:189 msgid "idle" msgstr "inoccupé" -#: usr/lib/co2monitor/python/co2monitor/service.py:188 +#: usr/lib/co2monitor/python/co2monitor/service.py:226 msgid "Request to stop logging on device {} - will terminate soon..." msgstr "" "reçu ordre stop d'enregistrement pour appareil {} - vais arrêter bientôt..." -#: usr/lib/co2monitor/python/co2monitor/service.py:197 +#: usr/lib/co2monitor/python/co2monitor/service.py:235 msgid "Shutting down logging thread of device {}" msgstr "en train d'éteindre le thread d'enregistrement pour appareil {} " -#: usr/lib/co2monitor/python/co2monitor/service.py:204 +#: usr/lib/co2monitor/python/co2monitor/service.py:238 +msgid "logging thread for device {} was shut down properly." +msgstr "" +"le thread d'enregistrement pour appareil {} était arrêtré proprement." + +#: usr/lib/co2monitor/python/co2monitor/service.py:244 msgid "Starting data logging on device {}" msgstr "commence enregistrement pour appareil {}" -#: usr/lib/co2monitor/python/co2monitor/service.py:208 +#: usr/lib/co2monitor/python/co2monitor/service.py:248 msgid "creating data directory" msgstr "créer le dossier de données" -#: usr/lib/co2monitor/python/co2monitor/service.py:211 +#: usr/lib/co2monitor/python/co2monitor/service.py:251 msgid "created data directory" msgstr "crée dossier de données" -#: usr/lib/co2monitor/python/co2monitor/service.py:225 +#: usr/lib/co2monitor/python/co2monitor/service.py:265 msgid "device warmup" msgstr "rechauffage de l'appareil" -#: usr/lib/co2monitor/python/co2monitor/service.py:227 +#: usr/lib/co2monitor/python/co2monitor/service.py:267 msgid "giving the device another {} seconds of warmup time..." msgstr "J'attends quelques {} secondes pour l'appareil de se réchauffer..." -#: usr/lib/co2monitor/python/co2monitor/service.py:233 +#: usr/lib/co2monitor/python/co2monitor/service.py:273 msgid "opening data file" msgstr "ouvrir fichier d'enregistrement" -#: usr/lib/co2monitor/python/co2monitor/service.py:235 +#: usr/lib/co2monitor/python/co2monitor/service.py:275 msgid "opened data file" msgstr "ourvert fichier d'enregistrement" -#: usr/lib/co2monitor/python/co2monitor/service.py:236 +#: usr/lib/co2monitor/python/co2monitor/service.py:276 msgid "opened {} for data logging." msgstr "ouvert {} pour enregistrer les données." -#: usr/lib/co2monitor/python/co2monitor/service.py:240 +#: usr/lib/co2monitor/python/co2monitor/service.py:280 msgid "writing header to file" msgstr "enregistrer zond d'en-tête au fichier" -#: usr/lib/co2monitor/python/co2monitor/service.py:245 +#: usr/lib/co2monitor/python/co2monitor/service.py:285 msgid "reading from device" msgstr "en lisant de l'appareil" -#: usr/lib/co2monitor/python/co2monitor/service.py:249 +#: usr/lib/co2monitor/python/co2monitor/service.py:289 msgid "postprocessing raw data" msgstr "travail postérieur des données crus" -#: usr/lib/co2monitor/python/co2monitor/service.py:272 +#: usr/lib/co2monitor/python/co2monitor/service.py:312 msgid "writing data to file" msgstr "écrire les données au fichier" -#: usr/lib/co2monitor/python/co2monitor/service.py:283 +#: usr/lib/co2monitor/python/co2monitor/service.py:323 msgid "stopped logging." msgstr "enregistrement arrêté." -#: usr/lib/co2monitor/python/co2monitor/service.py:284 +#: usr/lib/co2monitor/python/co2monitor/service.py:324 msgid "closed data logging file '{}'" msgstr "fichier d'enregistrement '{}' fermé" -#: usr/lib/co2monitor/python/co2monitor/service.py:286 +#: usr/lib/co2monitor/python/co2monitor/service.py:326 msgid "Stopped data logging on device {}" msgstr "arrêté enregistrement d'appareil {}" @@ -247,6 +268,10 @@ msgstr "" "variable d'environnement DEVNAME '{}' est un fichier pas existant. " "Interruption." +#, fuzzy +#~ msgid "getting monitored_devices..." +#~ msgstr "en train d'arrêter co2monitor..." + #~ msgid "co2monitor was started by {}" #~ msgstr "Co2moniteur était lancé par {}."