From sappj at ieee.org Mon Mar 30 00:03:58 2009 From: sappj at ieee.org (Joe Sapp) Date: Sun, 29 Mar 2009 18:03:58 -0400 Subject: [icalendar-dev] UIDGenerator bug? Message-ID: <49CFF04E.80407@ieee.org> I believe I've found a bug in the UIDGenerator tool. 'PropertyValues' couldn't be imported. My fix is so trivial, I've included it inline at the end of the email. -- Joe Sapp --- tools.py.orig 2008-07-11 13:18:52.000000000 -0400 +++ tools.py 2009-03-29 18:01:11.000000000 -0400 @@ -1,5 +1,6 @@ from string import ascii_letters, digits import random +from datetime import datetime """ This module contains non-essential tools for iCalendar. Pretty thin so far eh? @@ -42,9 +43,9 @@ datetime-uniquevalue at host. Like: 20050105T225746Z-HKtJMqUgdO0jDUwm at example.com """ - from PropertyValues import vText, vDatetime + from icalendar.prop import vText, vDatetime #PropertyValues import vText, vDatetime unique = unique or self.rnd_string() - return vText('%s-%s@%s' % (vDatetime.today().ical(), unique, host_name)) + return vText('%s-%s@%s' % (vDatetime(datetime.today()).ical(), unique, host_name)) if __name__ == "__main__":