from cgi import escape
import weakref
import debugging
+import logging
+logger = logging.getLogger(__name__)
from rss_sqlite import Listing
from opml import GetOpmlData, ExportOpmlData
try:
self.orientation = FremantleRotation(__appname__, main_window=self.window, app=self)
self.orientation.set_mode(self.config.getOrientation())
- except:
- print "Could not start rotation manager"
+ except Exception, e:
+ logger.warn("Could not start rotation manager: %s" % str(e))
menu = hildon.AppMenu()
# Create a button and add it to the menu
self.updateDbusHandler.ArticleCountUpdated()
if not self.had_interaction and 'DBUS_STARTER_ADDRESS' in environ:
- print "Update complete. No interaction, started by dbus: quitting."
+ logger.info(
+ "Update complete. No interaction, started by dbus: quitting.")
self.quit()
def stop_running_update(self, button):
self.stopButton.set_sensitive(False)
try:
mkdir(CONFIGDIR)
except:
- print "Error: Can't create configuration directory"
+ logger.error("Error: Can't create configuration directory")
from sys import exit
exit(1)
app = FeedingIt()