Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv11744
Modified Files:
item.py
Log Message:
Workaround some weirdness... for some reason these should be of type None, but
are instead the string "None" which doesn't help, since the string "None" is
a valid string and hence not actually type None
I don't think anyone who doesn't know python understands what the heck I
just said.
Index: item.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/item.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** item.py 11 Jan 2004 10:57:28 -0000 1.49
--- item.py 14 Jan 2004 01:18:45 -0000 1.50
***************
*** 10,13 ****
--- 10,21 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.50 2004/01/14 01:18:45 outlyer
+ # Workaround some weirdness... for some reason these should be of type None, but
+ # are instead the string "None" which doesn't help, since the string "None" is
+ # a valid string and hence not actually type None
+ #
+ # I don't think anyone who doesn't know python understands what the heck I
+ # just said.
+ #
# Revision 1.49 2004/01/11 10:57:28 dischi
# remove coming up here, it is no item attr
***************
*** 388,392 ****
if attr == 'runtime':
length = None
! if self.info and hasattr(self.info, 'runtime'):
length = self.info['runtime']
if not length and self.info and hasattr(self.info, 'length'):
--- 396,408 ----
if attr == 'runtime':
length = None
!
! if hasattr(self.info,'length') and self.info['length'] == 'None':
! self.info['length'] = None
! if hasattr(self.info,'runtime') and self.info['runtime'] == 'None':
! # For some reason it's the string None, instead of the
! # NoneType
! self.info['runtime'] = None
!
! if self.info and hasattr(self.info, 'runtime') and self.info['runtime']:
length = self.info['runtime']
if not length and self.info and hasattr(self.info, 'length'):
***************
*** 401,405 ****
if isinstance(length, int) or isinstance(length, float) or \
isinstance(length, long):
! length = str(int(length) / 60)
if length.find('min') == -1:
length = '%s min' % length
--- 417,421 ----
if isinstance(length, int) or isinstance(length, float) or \
isinstance(length, long):
! length = str(int(round(length) / 60))
if length.find('min') == -1:
length = '%s min' % length
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog