~ubuntu-branches/ubuntu/precise/zeroinstall-injector/precise

« back to all changes in this revision

Viewing changes to zeroinstall/cmd/select.py

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Leonard
  • Date: 2011-10-16 11:32:42 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: james.westby@ubuntu.com-20111016113242-019nxef8gusev0r0
Tags: 1.4.1-1
* New upstream release.
* Changed "rpm" dependency from "recommends" to "suggests".

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# Copyright (C) 2011, Thomas Leonard
6
6
# See the README file for details, or visit http://0install.net.
7
7
 
 
8
from __future__ import print_function
 
9
 
8
10
import os, sys
9
11
import logging
10
12
 
162
164
                if uri in done: return
163
165
                done.add(uri)
164
166
                impl = sels.selections.get(uri, None)
165
 
                print indent + "- URI:", uri
 
167
                print(indent + "- URI:", uri)
166
168
                if impl:
167
 
                        print indent + "  Version:", impl.version
 
169
                        print(indent + "  Version:", impl.version)
168
170
                        #print indent + "  Command:", command
169
171
                        try:
170
172
                                if impl.id.startswith('package:'):
173
175
                                        path = impl.local_path or stores.lookup_any(impl.digests)
174
176
                        except zerostore.NotStored:
175
177
                                path = "(not cached)"
176
 
                        print indent + "  Path:", path
 
178
                        print(indent + "  Path:", path)
177
179
                        indent += "  "
178
180
 
179
181
                        deps = impl.dependencies
182
184
                        for child in deps:
183
185
                                print_node(child.interface, child.get_required_commands(), indent)
184
186
                else:
185
 
                        print indent + "  No selected version"
 
187
                        print(indent + "  No selected version")
186
188
 
187
189
 
188
190
        if sels.command: