updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / sipie / deprecated.patch
blob6c7a5c452dfe6ba2a5b0fe82377c2648aa4f79ba
1 diff --git a/Sipie/Config.py b/Sipie/Config.py
2 index 4d15719..f27860b 100644
3 --- a/Sipie/Config.py
4 +++ b/Sipie/Config.py
5 @@ -9,7 +9,7 @@
7 import os
8 import sys
9 -import md5
10 +import hashlib
11 import ConfigParser
12 import getpass
14 @@ -37,7 +37,7 @@ class Config:
15 """ used to convert the password to the type sirius wants
16 and we don't have to store a plain password on disk """
18 - digest = md5.new()
19 + digest = hashlib.md5()
20 digest.update(password)
21 secret = digest.hexdigest()
22 return secret
23 diff --git a/Sipie/StreamHandler.py b/Sipie/StreamHandler.py
24 index 3f2321d..d5e10a7 100644
25 --- a/Sipie/StreamHandler.py
26 +++ b/Sipie/StreamHandler.py
27 @@ -3,7 +3,7 @@
29 # Modified slighty by Eli Criffield for use in Sipie
31 -import sys, os, time
32 +import sys, os, time, subprocess
33 if sys.platform == 'win32':
34 import win32process, win32api, win32con
35 else:
36 @@ -13,6 +13,12 @@ else:
37 class streamPlayerError(Exception):
38 pass
40 +#Wrapper Function to Popen function
41 +def pipeopen(cmd, bufsize=0):
42 + p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
43 + stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
44 + return (p.stdin, p.stdout)
47 # Provides simple piped I/O to an mplayer process.
49 @@ -59,7 +65,8 @@ class mplayerHandler:
50 si)
51 self.handle = info[0]
52 else:
53 - self.mplayerIn, self.mplayerOut = os.popen4(mpc) #open pipe
54 + #self.mplayerIn, self.mplayerOut = os.popen4(mpc) #open pipe
55 + (self.mplayerIn, self.mplayerOut) = pipeopen(mpc)
56 fcntl.fcntl(self.mplayerOut, fcntl.F_SETFL, os.O_NONBLOCK)
58 # Plays the specified filename
59 @@ -168,7 +175,8 @@ class vlcHandler:
60 self.handle = info[0]
61 else:
62 cli = self.location + " --intf rc --rc-fake-tty --novideo --quiet"
63 - self.vlcIn, self.vlcOut = os.popen4(cli)
64 + #self.vlcIn, self.vlcOut = os.popen4(cli)
65 + (self.vlcIn, self.vlcOut) = pipeopen(cli)
66 fcntl.fcntl(self.vlcOut, fcntl.F_SETFL, os.O_NONBLOCK)
67 time.sleep(10)
69 @@ -494,7 +502,8 @@ class xineHandler:
70 cli = self.location + " --no-gui --no-splash --stdctl --session mrl=%s" % self.__url
71 #cli = self.location + " --no-gui --no-splash --stdctl --bug-report=/home/akendall/bartender.mp3"
72 #print cli # DEBUG
73 - self.xineIn, self.xineOut = os.popen4(cli)
74 + #self.xineIn, self.xineOut = os.popen4(cli)
75 + (self.xineIn, self.xineOut) = pipeopen(cli)
76 fcntl.fcntl(self.xineOut, fcntl.F_SETFL, os.O_NONBLOCK)
78 time.sleep(2)