mirror of
https://github.com/pkali/piradio-mini.git
synced 2026-05-20 22:34:22 +02:00
Change timeout if called from PHP.
This commit is contained in:
+7
-1
@@ -455,9 +455,15 @@ for line in open(StationList,'r'):
|
||||
filenumber += 1
|
||||
continue
|
||||
|
||||
# Set timeout depending on the parameter
|
||||
if deleteOld:
|
||||
timeo = 1
|
||||
else:
|
||||
timeo = 10
|
||||
|
||||
# Get the published URL to the stream file
|
||||
try:
|
||||
file = urllib2.urlopen(url)
|
||||
file = urllib2.urlopen(url, timeout=timeo)
|
||||
data = file.read()
|
||||
file.close()
|
||||
# Creat list from data
|
||||
|
||||
Reference in New Issue
Block a user