|
From: <di...@us...> - 2009-02-01 17:18:43
|
Revision: 630
http://safekeep.svn.sourceforge.net/safekeep/?rev=630&view=rev
Author: dimi
Date: 2009-02-01 17:18:42 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Frank Crawford <fr...@cr...>
Avoid errors when dealing with mounts containing spaces.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2009-01-13 05:11:57 UTC (rev 629)
+++ safekeep/trunk/safekeep 2009-02-01 17:18:42 UTC (rev 630)
@@ -486,11 +486,13 @@
cout.close()
cin.close()
mounts = []
+ pattern = re.compile(r"^(\S+) on (.+) type (\S+) \((\S+)\)")
if reverse:
lines.reverse()
for line in lines:
- (device, blah1, mountpoint, blah2, mounttype, mountoptions) = line.split()
- mounts.append([device, mountpoint, mounttype, mountoptions[1:-1]])
+ matches = pattern.match(line)
+ if not matches is None:
+ mounts.append(matches.groups())
return mounts
def map_lvm_device(device):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|