[mythtv-commits] Ticket #2715: ValueError in mythburn.py due to improper parsing of "mount" command output

MythTV mythtv at cvs.mythtv.org
Fri Dec 1 13:19:48 UTC 2006


#2715: ValueError in mythburn.py due to improper parsing of "mount" command output
------------------------------------+---------------------------------------
 Reporter:  eliasen at mindspring.com  |        Owner:  paulh  
     Type:  defect                  |       Status:  new    
 Priority:  major                   |    Milestone:  unknown
Component:  mytharchive             |      Version:  0.20   
 Severity:  high                    |   Resolution:         
------------------------------------+---------------------------------------
Comment (by paulh):

 Replying to [comment:1 anonymous]:
 > I thought of another solution that's probably a lot more portable.  The
 python method os.ismount() will return true if a particular directory is a
 mount point.  When we get a path, to determine if it's remotely mounted,
 we'd just have to repeatedly call os.split() on the pathname and
 os.ismount() on the remaining head of the path to see if any of the
 directories above are actually mount points.  This would not be
 excessively slow (probably quicker than forking mount), and should be
 portable.
 >
 > I haven't actually written a patch that does this, so if the person
 responsible could indicate their progress on this bug, I can write one up.
 >
 > --
 >   Alan Eliasen
 >   eliasen at mindspring.com


 Unless I'm misunderstanding something I don't think that would work. It
 would only tell you that you've reached a mount point not whether it is a
 moint point on a remote FS which is what we want.

 It's a shame that python doesn't have something like os.statfs() which
 would make it easy.

 It should be easy to do something like this in c so I might just end up
 adding an option in mytharchivehelper that the python script can call to
 determine if a file is on a remote FS.

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/2715#comment:2>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list