Skip to content

Commit

Permalink
Implement --now and --packages as Query methods
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Oct 2, 2016
1 parent 36b091d commit d2f5164
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tracer/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ class Query(object):
def __init__(self, tracer=Tracer):
self._tracer = tracer(System.package_manager(), Rules, Applications, dump_memory)

def from_packages(self, packages):
"""List of ``Package`` that only should be traced"""
self._tracer.specified_packages = packages
return self

def now(self):
"""
Pretend that specified packages have been updated just now.
Benefit of this is absolutely no need for openning the package history database
"""
self._tracer.now = True
return self

def affected_applications(self, user=None):
"""
Return list of applications which use some outdated files
Expand Down

0 comments on commit d2f5164

Please sign in to comment.