Commit ce00b735 authored by Michael W. Hudson's avatar Michael W. Hudson

Fix

[ 530236 ] os.py assumes existence of statvfs_resul

This was pretty dense of me.  Sorry.

2.2.1 candidate.
parent d4233b2b
......@@ -612,7 +612,10 @@ def _pickle_stat_result(sr):
(type, args) = sr.__reduce__()
return (_make_stat_result, args)
_copy_reg.pickle(stat_result, _pickle_stat_result,_make_stat_result)
try:
_copy_reg.pickle(stat_result, _pickle_stat_result, _make_stat_result)
except NameError: # stat_result may not exist
pass
def _make_statvfs_result(tup, dict):
return statvfs_result(tup, dict)
......@@ -621,4 +624,8 @@ def _pickle_statvfs_result(sr):
(type, args) = sr.__reduce__()
return (_make_statvfs_result, args)
_copy_reg.pickle(statvfs_result, _pickle_statvfs_result,_make_statvfs_result)
try:
_copy_reg.pickle(statvfs_result, _pickle_statvfs_result,
_make_statvfs_result)
except NameError: # stat_result may not exist
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment