2010-07-18, 14:13
I don't know what is going wrong !
Is this may a problem with a svn build ?
I have this function
I do check if a file exists and if it does it should read the file line by line ....
I can do what I want ... the foor loop is never executed ....
The file that should be read is text-only do exists.
Inside the log I have the following ....
The foor loop is never be touched ...
Any hints ?
Is this may a problem with a svn build ?
I have this function
Code:
#########################################################
# Function : OSDVDAudioTrack #
#########################################################
# Parameter : #
# #
# track track-number to get audio (1-X) #
# #
# Returns : #
# #
# audio list with tracks or none #
# #
#########################################################
def OSDVDAudioTrack(track):
global __configLinux__
global __verbose__
audio = []
OSlog("dvd4.sh command ready to start")
OSlog("dvd4.sh para1=[" + __configLinux__[1] + "] para2=[" + str(track) + "]")
OSRun("dvd4.sh " + __configLinux__[1] + " " + str(track),True,True)
time.sleep(2)
if (os.path.exists(__configLinux__[48])):
ListF = open(__configLinux__[48],'r')
OSlog("Here I do pass in my code and the for loop should run ")
for line in ListF.readlines():
line = line.strip()
audio.append(line)
OSlog("OSReadList data to add :" + line)
OSlog("For loop passed")
OSlog("OSReadList file-close")
ListF.close()
index = len(audio)
if (index == 0):
OSlog("audio list is empty !!!!!!")
audio.append('none')
return (audio)
else:
return (audio)
else:
OSlog("dvd-audio tracks could not be read !! :" + __configLinux__[48])
audio.append('none')
return (audio)
#########################################################
I do check if a file exists and if it does it should read the file line by line ....
I can do what I want ... the foor loop is never executed ....
The file that should be read is text-only do exists.
Inside the log I have the following ....
Code:
14:00:09 T:3023050624 M:1507512320 DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
14:00:09 T:2913303408 M:1507512320 NOTICE: [swiss-army-knife]: [OSlog] Command to log inside ssh:echo "dvd4.sh /dev/sr0 3" >> /home/user/.xbmc/userdata/add$
14:00:09 T:2913303408 M:1507512320 NOTICE: [swiss-army-knife]: [OSlog] OSRun start
14:00:09 T:2913303408 M:1507368960 NOTICE: [swiss-army-knife]: [OSlog] Command to run :ssh user@localhost /home/user/.xbmc/addons/swiss-army-knife/shell-li$
14:00:09 T:2913303408 M:1507368960 NOTICE: [swiss-army-knife]: [OSlog] OSRun end
14:00:09 T:3023050624 M:1507368960 DEBUG: ------ Window Deinit (DialogBusy.xml) ------
14:00:11 T:2913303408 M:1506758656 NOTICE: [swiss-army-knife]: [OSlog] Here I do pass in my code and the for loop should run
14:00:11 T:2913303408 M:1506758656 NOTICE: [swiss-army-knife]: [OSlog] For loop passed
14:00:11 T:2913303408 M:1506758656 NOTICE: [swiss-army-knife]: [OSlog] OSReadList file-close
14:00:11 T:2913303408 M:1506758656 NOTICE: [swiss-army-knife]: [OSlog] audio list is empty !!!!!!
14:00:11 T:2913303408 M:1506758656 NOTICE: [swiss-army-knife]: [GUIlog] dvd4.sh executed
14:00:11 T:2913303408 M:1506758656 INFO: Loading skin file: DialogOK.xml
The foor loop is never be touched ...
Any hints ?