openbsd-ports/x11/gnome/hamster-applet/patches/patch-hamster___init___py
jasper 3c1951d197 import hamster-applet 2.24.2
Project Hamster is time tracking for masses. It helps you to keep track
on how much time you have spent during the day on activities you have
set up. At the beginning you define some activities you do, like
"hacking GNOME", "listening to Humppa", "hurling beer", "pretend to be
hacking" and so on, and, whenever you change from doing one task to
other, you change your current activity in Hamster. After a while you
can see some statistics of how many hours you have spent on what. Some
nice reports and graphical statistics will help you keep time tracking
fun.

ok ajacoutot@
2008-11-24 23:15:54 +00:00

18 lines
658 B
Plaintext

$OpenBSD: patch-hamster___init___py,v 1.1.1.1 2008/11/24 23:15:54 jasper Exp $
--- hamster/__init__.py.orig Mon Nov 24 22:42:07 2008
+++ hamster/__init__.py Mon Nov 24 22:42:10 2008
@@ -75,6 +75,13 @@ if not exists(HAMSTER_DB):
print "Database not found in %s - installing default from %s!" % (HAMSTER_DB, SHARED_DATA_DIR)
copyfile(join(SHARED_DATA_DIR, DB_FILE), HAMSTER_DB)
+# In case we created the file read-only, change the mode.
+if exists(HAMSTER_DB):
+ try:
+ os.chmod(HAMSTER_DB, 0664)
+ except Exception , msg:
+ print 'Error:could not change mode on %s!' % (HAMSTER_DB)
+
# Init storage
dispatcher = Dispatcher()