~ubuntu-branches/ubuntu/wily/attic/wily

« back to all changes in this revision

Viewing changes to attic/repository.py

  • Committer: Package Import Robot
  • Author(s): Clint Adams
  • Date: 2013-11-25 09:06:12 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20131125090612-hp1yitu1qnpbuaq7
Tags: 0.8.1-1
* New upstream version.
* Bump to Standards-Version 3.9.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        self.path = path
72
72
        if not os.path.isdir(path):
73
73
            raise self.DoesNotExist(path)
74
 
        self.lock_fd = open(os.path.join(path, 'README'), 'r+')
 
74
        self.lock_fd = open(os.path.join(path, 'config'), 'r')
75
75
        fcntl.flock(self.lock_fd, fcntl.LOCK_EX)
76
76
        self.config = RawConfigParser()
77
77
        self.config.read(os.path.join(self.path, 'config'))
108
108
            self.compact = set()
109
109
        else:
110
110
            if read_only:
111
 
                self.index = NSIndex((os.path.join(self.path, 'index.%d') % head).encode('utf-8'))
 
111
                self.index = NSIndex((os.path.join(self.path, 'index.%d') % head).encode('utf-8'), readonly=True)
112
112
            else:
113
113
                shutil.copy(os.path.join(self.path, 'index.%d' % head),
114
114
                            os.path.join(self.path, 'index.tmp'))