diff --git a/python_apps/api_clients/install/api_client_install.py b/python_apps/api_clients/install/api_client_install.py index c81b0b47b..abc1d07de 100644 --- a/python_apps/api_clients/install/api_client_install.py +++ b/python_apps/api_clients/install/api_client_install.py @@ -2,7 +2,6 @@ import os import shutil import sys from configobj import ConfigObj -import upgrade2dot2 def get_current_script_dir(): return os.path.dirname(os.path.realpath(__file__)) @@ -21,8 +20,6 @@ current_script_dir = get_current_script_dir() if not os.path.exists(PATH_INI_FILE): shutil.copy('%s/../api_client.cfg'%current_script_dir, PATH_INI_FILE) -upgrade2dot2.upgrade('%s/../api_client.cfg'% current_script_dir, PATH_INI_FILE) - """load config file""" try: config = ConfigObj("%s/../api_client.cfg" % current_script_dir) diff --git a/python_apps/media-monitor/install/media-monitor-copy-files.py b/python_apps/media-monitor/install/media-monitor-copy-files.py index 41ab6e8fc..5f3b5d0f0 100644 --- a/python_apps/media-monitor/install/media-monitor-copy-files.py +++ b/python_apps/media-monitor/install/media-monitor-copy-files.py @@ -4,7 +4,6 @@ import sys import subprocess import random import string -import upgrade2dot2 from configobj import ConfigObj if os.geteuid() != 0: @@ -63,9 +62,6 @@ try: mm2_source = os.path.realpath(os.path.join(current_script_dir, "../../media-monitor2")) copy_dir(mm2_source, os.path.join( config["bin_dir"], "mm2" )) - # upgrade mm2 config - upgrade2dot2.upgrade(('%s/../media-monitor.cfg'%current_script_dir), - PATH_INI_FILE) #copy init.d script shutil.copy(config["bin_dir"]+"/airtime-media-monitor-init-d", "/etc/init.d/airtime-media-monitor") diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index 2657ec2d7..3f0b8bbe4 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -273,6 +273,8 @@ def organized_path(old_path, root_path, orig_md): def default_f(dictionary, key): if key in dictionary: return len(dictionary[key]) == 0 else: return True + # We set some metadata elements to a default "unknown" value because we use + # these fields to create a path hence they cannot be empty normal_md = default_to_f(orig_md, path_md, unicode_unknown, default_f) if is_airtime_recorded(normal_md): fname = u'%s-%s-%s.%s' % ( normal_md['MDATA_KEY_YEAR'],