← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/bug-1023585 into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1023585 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1023585 in OpenLP: ""No handlers could be found for logger "openlp.core.lib"""
  https://bugs.launchpad.net/openlp/+bug/1023585

For more details, see:
https://code.launchpad.net/~googol/openlp/bug-1023585/+merge/115791

fixed bug 1023585 (No handlers could be found for logger 'openlp.core.lib')
-- 
https://code.launchpad.net/~googol/openlp/bug-1023585/+merge/115791
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/bug-1023585 into lp:openlp.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py	2012-07-11 18:06:33 +0000
+++ openlp/core/__init__.py	2012-07-19 17:28:21 +0000
@@ -248,6 +248,13 @@
     # Parse command line options and deal with them.
     # Use args supplied programatically if possible.
     (options, args) = parser.parse_args(args) if args else parser.parse_args()
+    if options.portable:
+        app_path = AppLocation.get_directory(AppLocation.AppDir)
+        set_up_logging(os.path.abspath(os.path.join(app_path, u'..',
+            u'..', u'Other')))
+        log.info(u'Running portable')
+    else:
+        set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
     qt_args = []
     if options.loglevel.lower() in ['d', 'debug']:
         log.setLevel(logging.DEBUG)
@@ -269,10 +276,6 @@
         app.setApplicationName(u'OpenLPPortable')
         Settings.setDefaultFormat(Settings.IniFormat)
         # Get location OpenLPPortable.ini
-        app_path = AppLocation.get_directory(AppLocation.AppDir)
-        set_up_logging(os.path.abspath(os.path.join(app_path, u'..',
-            u'..', u'Other')))
-        log.info(u'Running portable')
         portable_settings_file = os.path.abspath(os.path.join(app_path, u'..',
             u'..', u'Data', u'OpenLP.ini'))
         # Make this our settings file
@@ -289,7 +292,6 @@
         portable_settings.sync()
     else:
         app.setApplicationName(u'OpenLP')
-        set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
     app.setApplicationVersion(get_application_version()[u'version'])
     # Instance check
     if not options.testing:


Follow ups