A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/cpython/commit/b940e113bf90ff71b0ef57414ea2beea9d2a4bc0 below:

SF patch 1631942 by Collin Winter: · python/cpython@b940e11 · GitHub

Expand file treeCollapse file tree 295 files changed

+817

-743

lines changed Original file line number Diff line number Diff line change

@@ -119,5 +119,5 @@ def store(self):

119 119

f.write('\n')

120 120

f.close()

121 121

return ""

122 -

except IOError, err:

122 +

except IOError as err:

123 123

return "IOError: %s" % str(err)

Original file line number Diff line number Diff line change

@@ -28,7 +28,7 @@ def main():

28 28

for file in sys.argv[1:]:

29 29

try:

30 30

fp = open(file, 'r')

31 -

except IOError, msg:

31 +

except IOError as msg:

32 32

print "%s: %s" % (file, msg)

33 33

continue

34 34

lineno = 0

Original file line number Diff line number Diff line change

@@ -41,7 +41,7 @@ def main():

41 41

def reportboguslinks(prefix):

42 42

try:

43 43

names = os.listdir('.')

44 -

except os.error, msg:

44 +

except os.error as msg:

45 45

print "%s%s: can't list: %s" % (prefix, '.', msg)

46 46

return

47 47

names.sort()

@@ -62,7 +62,7 @@ def reportboguslinks(prefix):

62 62

elif S_ISDIR(mode):

63 63

try:

64 64

os.chdir(name)

65 -

except os.error, msg:

65 +

except os.error as msg:

66 66

print "%s%s: can't chdir: %s" % \

67 67

(prefix, name, msg)

68 68

continue

Original file line number Diff line number Diff line change

@@ -17,7 +17,7 @@ def testChunk(t, fileName):

17 17

# against a large source file like Tkinter.py.

18 18

ast = None

19 19

new = parser.tuple2ast(tup)

20 -

except parser.ParserError, err:

20 +

except parser.ParserError as err:

21 21

print

22 22

print 'parser module raised exception on input file', fileName + ':'

23 23

traceback.print_exc()

Original file line number Diff line number Diff line change

@@ -492,7 +492,7 @@ def testdir(a):

492 492

print 'Testing %s' % fullname

493 493

try:

494 494

roundtrip(fullname, output)

495 -

except Exception, e:

495 +

except Exception as e:

496 496

print ' Failed to compile, exception is %s' % repr(e)

497 497

elif os.path.isdir(fullname):

498 498

testdir(fullname)

Original file line number Diff line number Diff line change

@@ -87,7 +87,7 @@ def visible(self, name):

87 87

fs = macfs.FSSpec(name)

88 88

c, t = fs.GetCreatorType()

89 89

if t != 'TEXT': return 0

90 -

except macfs.error, msg:

90 +

except macfs.error as msg:

91 91

print "***", name, msg

92 92

return 0

93 93

else:

Original file line number Diff line number Diff line change

@@ -42,7 +42,7 @@ def run(self, args = None):

42 42

if args is None: args = sys.argv[1:]

43 43

try:

44 44

opts, args = getopt.getopt(args, self.GlobalFlags)

45 -

except getopt.error, msg:

45 +

except getopt.error as msg:

46 46

return self.usage(msg)

47 47

self.options(opts)

48 48

if not args:

@@ -62,7 +62,7 @@ def run(self, args = None):

62 62

flags = ''

63 63

try:

64 64

opts, args = getopt.getopt(args[1:], flags)

65 -

except getopt.error, msg:

65 +

except getopt.error as msg:

66 66

return self.usage(

67 67

"subcommand %s: " % cmd + str(msg))

68 68

self.ready()

Original file line number Diff line number Diff line change

@@ -135,7 +135,7 @@ def compare(local, remote, mode):

135 135

def sendfile(local, remote, name):

136 136

try:

137 137

remote.create(name)

138 -

except (IOError, os.error), msg:

138 +

except (IOError, os.error) as msg:

139 139

print "cannot create:", msg

140 140

return

141 141

@@ -171,7 +171,7 @@ def recvfile(local, remote, name):

171 171

def recvfile_real(local, remote, name):

172 172

try:

173 173

local.create(name)

174 -

except (IOError, os.error), msg:

174 +

except (IOError, os.error) as msg:

175 175

print "cannot create:", msg

176 176

return

177 177 Original file line number Diff line number Diff line change

@@ -129,7 +129,7 @@ def setlockdir(self):

129 129

self.lockdir = self.cvslck

130 130

os.mkdir(self.cvslck, 0777)

131 131

return

132 -

except os.error, msg:

132 +

except os.error as msg:

133 133

self.lockdir = None

134 134

if msg[0] == EEXIST:

135 135

try:

@@ -234,7 +234,7 @@ def MultipleWriteLock(repositories, delay = DELAY):

234 234

for r in repositories:

235 235

try:

236 236

locks.append(WriteLock(r, 0))

237 -

except Locked, instance:

237 +

except Locked as instance:

238 238

del locks

239 239

break

240 240

else:

Original file line number Diff line number Diff line change

@@ -22,7 +22,7 @@ def main():

22 22

raise getopt.error, "unknown command"

23 23

coptset, func = commands[cmd]

24 24

copts, files = getopt.getopt(rest, coptset)

25 -

except getopt.error, msg:

25 +

except getopt.error as msg:

26 26

print msg

27 27

print "usage: rrcs [options] command [options] [file] ..."

28 28

print "where command can be:"

@@ -41,7 +41,7 @@ def main():

41 41

for fn in files:

42 42

try:

43 43

func(x, copts, fn)

44 -

except (IOError, os.error), msg:

44 +

except (IOError, os.error) as msg:

45 45

print "%s: %s" % (fn, msg)

46 46 47 47

def checkin(x, copts, fn):

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4