From 3a2d736b1c639825901db53eda3448e0dfe69bb2 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 8 Aug 2011 10:41:11 -0400 Subject: [PATCH] CC-2633: removing to_unicode() - removed to_unicode() function calls where it's not neccessary. --- .../airtime-1.9.0/airtimefilemonitor/airtimemetadata.py | 1 - .../media-monitor/airtimefilemonitor/airtimemetadata.py | 1 - utils/airtime-import/airtime-import.py | 5 ----- 3 files changed, 7 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.9.0/airtimefilemonitor/airtimemetadata.py b/install_minimal/upgrades/airtime-1.9.0/airtimefilemonitor/airtimemetadata.py index 95633a72f..8f8aa2893 100644 --- a/install_minimal/upgrades/airtime-1.9.0/airtimefilemonitor/airtimemetadata.py +++ b/install_minimal/upgrades/airtime-1.9.0/airtimefilemonitor/airtimemetadata.py @@ -191,7 +191,6 @@ class AirtimeMetadata: if (isinstance(md[key], basestring)): #self.logger.info("Converting md[%s] = '%s' ", key, md[key]) - md[key] = to_unicode(md[key]) md[key] = encode_to(md[key], 'utf-8') #self.logger.info("Converting complete: md[%s] = '%s' ", key, md[key]) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py b/python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py index d5d70d436..1b37b359f 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py @@ -231,7 +231,6 @@ class AirtimeMetadata: if (isinstance(md[key], basestring)): #self.logger.info("Converting md[%s] = '%s' ", key, md[key]) - md[key] = api_client.to_unicode(md[key]) md[key] = api_client.encode_to(md[key], 'utf-8') #self.logger.info("Converting complete: md[%s] = '%s' ", key, md[key]) diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index b397f828a..fdad11512 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -37,9 +37,7 @@ def copy_or_move_files_to(paths, dest, flag): path = os.path.realpath(path) else: path = currentDir+path - path = apc.to_unicode(path) path = apc.encode_to(path, 'utf-8') - dest = apc.to_unicode(dest) dest = apc.encode_to(dest, 'utf-8') if(os.path.exists(path)): if(os.path.isdir(path)): @@ -148,7 +146,6 @@ def WatchAddAction(option, opt, value, parser): path = os.path.realpath(path) else: path = currentDir+path - path = apc.to_unicode(path) path = apc.encode_to(path, 'utf-8') if(os.path.isdir(path)): res = api_client.add_watched_dir(path) @@ -189,7 +186,6 @@ def WatchRemoveAction(option, opt, value, parser): path = os.path.realpath(path) else: path = currentDir+path - path = apc.to_unicode(path) path = apc.encode_to(path, 'utf-8') if(os.path.isdir(path)): res = api_client.remove_watched_dir(path) @@ -235,7 +231,6 @@ def StorageSetAction(option, opt, value, parser): path = os.path.realpath(path) else: path = currentDir+path - path = apc.to_unicode(path) path = apc.encode_to(path, 'utf-8') if(os.path.isdir(path)): res = api_client.set_storage_dir(path)