Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/o/s/osc2-HEAD/osc2/wc/package.py   osc2(Download)
                          FileConflictError, PendingTransactionError,
from osc2.wc.util import (wc_read_package, wc_read_project, wc_read_apiurl,
                          wc_init, wc_lock, wc_write_package, wc_write_project,
                          wc_write_apiurl, wc_write_files, wc_read_files,
        self.merge_class = merge_class
        with wc_lock(path) as lock:
            self._files = wc_read_files(path)
        # call super at the end due to finish_pending_transaction
        super(Package, self).__init__(path, PackageUpdateState,
        # check if _files file is a valid xml
            files = wc_read_files(path)
        except ValueError as e:
            return (missing, wc_read_files(path, raw=True), [])
        if _PKG_DATA in missing:
            os.mkdir(wc_pkg_data_filename(path, ''))
        files = wc_read_files(path)
        # check again - only pkg_data left
        missing, xml_data, pkg_data = Package.wc_check(path)

src/o/s/osc2-HEAD/osc2/wc/convert.py   osc2(Download)
from osc2.wc.project import Project
from osc2.wc.package import Package
from osc2.wc.util import (wc_read_files, wc_pkg_data_filename, _storefile,
                         _write_storefile, _VERSION, wc_read_project,
                         _read_storefile, wc_read_packages, missing_storepaths,
        os.unlink(_storefile(path, '_in_conflict'))
        files = wc_read_files(path)
    except ValueError as e:
        files = None