diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 015d400c5..9edf53755 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -1276,7 +1276,7 @@ class Application_Model_Preference return $ds['ColReorder'][$x]; } else { /*For now we just have this hack for debugging. We should not - rely on this crappy behaviour in case of failure*/ + rely on this behaviour in case of failure*/ Logging::warn("Index $x does not exist preferences"); Logging::warn("Defaulting to identity and printing preferences"); Logging::warn($ds); diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 10e559c3b..4477e28ff 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -1017,7 +1017,7 @@ class Application_Service_HistoryService TEMPLATE_TIME => "strval", TEMPLATE_DATETIME => "strval", TEMPLATE_STRING => "strval", - TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ TEMPLATE_INT => "intval", TEMPLATE_FLOAT => "floatval", ); diff --git a/airtime_mvc/library/propel/docs/cookbook/Multi-Component.txt b/airtime_mvc/library/propel/docs/cookbook/Multi-Component.txt index 1fba7e2af..f033ce70c 100644 --- a/airtime_mvc/library/propel/docs/cookbook/Multi-Component.txt +++ b/airtime_mvc/library/propel/docs/cookbook/Multi-Component.txt @@ -188,7 +188,7 @@ build/ book.schema.sql // contains CREATE TABLE book and CREATE TABLE review }}} -And, as you probably expect it, a package overridden at the table level also acocunts for an independent SQL file: +And, as you probably expect it, a package overridden at the table level also accounts for an independent SQL file: {{{ build/ diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index d25c60f4f..e47336d25 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -234,7 +234,7 @@ class AirtimeApiClient(object): def get_schedule(self): # TODO : properly refactor this routine - # For now the return type is a little fucked for compatibility reasons + # For now the return type is a little messed up for compatibility reasons try: return (True, self.services.export_url()) except: return (False, None) diff --git a/python_apps/media-monitor2/media/monitor/organizer.py b/python_apps/media-monitor2/media/monitor/organizer.py index 17f46054c..2407889f5 100644 --- a/python_apps/media-monitor2/media/monitor/organizer.py +++ b/python_apps/media-monitor2/media/monitor/organizer.py @@ -70,8 +70,8 @@ class Organizer(ReportHandler,Loggable): mmp.magic_move(event.path, new_path, after_dir_make=new_dir_watch(dirname(new_path))) - # The reason we need to go around saving the owner in this ass - # backwards way is bewcause we are unable to encode the owner id + # The reason we need to go around saving the owner in this + # backwards way is because we are unable to encode the owner id # into the file itself so that the StoreWatchListener listener can # detect it from the file user().owner.add_file_owner(new_path, owner_id ) diff --git a/python_apps/media-monitor2/media/saas/airtimeinstance.py b/python_apps/media-monitor2/media/saas/airtimeinstance.py index f8c9cd3d8..c808a0620 100644 --- a/python_apps/media-monitor2/media/saas/airtimeinstance.py +++ b/python_apps/media-monitor2/media/saas/airtimeinstance.py @@ -58,12 +58,9 @@ class AirtimeInstance(object): def mm_config(self): return MMConfig(self.config_paths['media_monitor']) - # NOTE to future code monkeys: - # I'm well aware that I'm using the shitty service locator pattern - # instead of normal constructor injection as I should be. The reason - # for this is that I found these issues a little too close to the - # end of my tenure. It's highly recommended to rewrite this crap - # using proper constructor injection if you ever have the time + # I'm well aware that I'm using the service locator pattern + # instead of normal constructor injection as I should be. + # It's recommended to rewrite this using proper constructor injection @LazyProperty def owner(self): return Owner() diff --git a/python_apps/media-monitor2/pyitest.py b/python_apps/media-monitor2/pyitest.py index 471ba727e..c296799b1 100755 --- a/python_apps/media-monitor2/pyitest.py +++ b/python_apps/media-monitor2/pyitest.py @@ -5,7 +5,7 @@ import getopt import pyinotify import pprint -# a little shit script to test out pyinotify events +# a little script to test out pyinotify events class AT(pyinotify.ProcessEvent): def process_default(self, event): diff --git a/python_apps/media-monitor2/tests/prepare_tests.py b/python_apps/media-monitor2/tests/prepare_tests.py index 4e9a2247c..ebbce89b8 100644 --- a/python_apps/media-monitor2/tests/prepare_tests.py +++ b/python_apps/media-monitor2/tests/prepare_tests.py @@ -1,10 +1,10 @@ -# The tests rely on a lot of absolute paths and other garbage so this file +# The tests rely on a lot of absolute paths so this file # configures all of that music_folder = u'/home/rudi/music' o_path = u'/home/rudi/throwaway/ACDC_-_Back_In_Black-sample-64kbps.ogg' -watch_path = u'/home/rudi/throwaway/fucking_around/watch/', -real_path1 = u'/home/rudi/throwaway/fucking_around/watch/unknown/unknown/ACDC_-_Back_In_Black-sample-64kbps-64kbps.ogg' +watch_path = u'/home/rudi/throwaway/watch/', +real_path1 = u'/home/rudi/throwaway/watch/unknown/unknown/ACDC_-_Back_In_Black-sample-64kbps-64kbps.ogg' opath = u"/home/rudi/Airtime/python_apps/media-monitor2/tests/" ppath = u"/home/rudi/Airtime/python_apps/media-monitor2/media/" @@ -12,4 +12,3 @@ api_client_path = '/etc/airtime/api_client.cfg' # holdover from the time we had a special config for testing sample_config = api_client_path real_config = api_client_path - diff --git a/python_apps/media-monitor2/tests/test_eventcontractor.py b/python_apps/media-monitor2/tests/test_eventcontractor.py index f5ad827c2..5d53880ad 100644 --- a/python_apps/media-monitor2/tests/test_eventcontractor.py +++ b/python_apps/media-monitor2/tests/test_eventcontractor.py @@ -7,22 +7,22 @@ DeleteFile class TestMMP(unittest.TestCase): def test_event_registered(self): ev = EventContractor() - e1 = NewFile( FakePyinotify('bullshit.mp3') ).proxify() - e2 = MoveFile( FakePyinotify('bullshit.mp3') ).proxify() + e1 = NewFile( FakePyinotify('bull.mp3') ).proxify() + e2 = MoveFile( FakePyinotify('bull.mp3') ).proxify() ev.register(e1) self.assertTrue( ev.event_registered(e2) ) def test_get_old_event(self): ev = EventContractor() - e1 = NewFile( FakePyinotify('bullshit.mp3') ).proxify() - e2 = MoveFile( FakePyinotify('bullshit.mp3') ).proxify() + e1 = NewFile( FakePyinotify('bull.mp3') ).proxify() + e2 = MoveFile( FakePyinotify('bull.mp3') ).proxify() ev.register(e1) self.assertEqual( ev.get_old_event(e2), e1 ) def test_register(self): ev = EventContractor() - e1 = NewFile( FakePyinotify('bullshit.mp3') ).proxify() - e2 = DeleteFile( FakePyinotify('bullshit.mp3') ).proxify() + e1 = NewFile( FakePyinotify('bull.mp3') ).proxify() + e2 = DeleteFile( FakePyinotify('bull.mp3') ).proxify() self.assertTrue( ev.register(e1) ) self.assertFalse( ev.register(e2) ) @@ -33,14 +33,14 @@ class TestMMP(unittest.TestCase): self.assertEqual( delete_ev['mode'], u'delete') self.assertEqual( len(ev.store.keys()), 0 ) - e3 = DeleteFile( FakePyinotify('horseshit.mp3') ).proxify() + e3 = DeleteFile( FakePyinotify('horse.mp3') ).proxify() self.assertTrue( ev.register(e3) ) self.assertTrue( ev.register(e2) ) def test_register2(self): ev = EventContractor() - p = 'bullshit.mp3' + p = 'bull.mp3' events = [ NewFile( FakePyinotify(p) ), NewFile( FakePyinotify(p) ), diff --git a/python_apps/media-monitor2/tests/test_pure.py b/python_apps/media-monitor2/tests/test_pure.py index 6bc5d4906..a45efc3e4 100644 --- a/python_apps/media-monitor2/tests/test_pure.py +++ b/python_apps/media-monitor2/tests/test_pure.py @@ -38,7 +38,7 @@ class TestMMP(unittest.TestCase): m1 = mmp.file_md5(p) m2 = mmp.file_md5(p,10) self.assertTrue( m1 != m2 ) - self.assertRaises( ValueError, lambda : mmp.file_md5('/bull/shit/path') ) + self.assertRaises( ValueError, lambda : mmp.file_md5('/file/path') ) self.assertTrue( m1 == mmp.file_md5(p) ) def test_sub_path(self):