~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/gui2/tweak_book/save.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-02-27 07:48:06 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: package-import@ubuntu.com-20140227074806-64wdebb3ptosxhhx
Tags: upstream-1.25.0+dfsg
ImportĀ upstreamĀ versionĀ 1.25.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
            t.conn.send('bookedited:'+msg)
41
41
            t.conn.close()
42
42
 
 
43
def find_first_existing_ancestor(path):
 
44
    while path and not os.path.exists(path):
 
45
        npath = os.path.dirname(path)
 
46
        if npath == path:
 
47
            break
 
48
        path = npath
 
49
    return path
 
50
 
43
51
class SaveWidget(QWidget):
44
52
 
45
53
    def __init__(self, parent=None):