Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2829d040334e
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b6b9f0fc21f2
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 6, 2019

  1. Copy the full SHA
    b6b9f0f View commit details
Showing with 4 additions and 2 deletions.
  1. +4 −2 nmigen/build/run.py
6 changes: 4 additions & 2 deletions nmigen/build/run.py
Original file line number Diff line number Diff line change
@@ -56,11 +56,13 @@ def archive(self, file):

class BuildProducts:
def __init__(self, root):
self._root = root
# We provide no guarantees that files will be available on the local filesystem (i.e. in
# any way other than through `products.get()`), so downstream code must never rely on this.
self.__root = root

def get(self, filename, mode="b"):
assert mode in "bt"
with open(os.path.join(self._root, filename), "r" + mode) as f:
with open(os.path.join(self.__root, filename), "r" + mode) as f:
return f.read()

@contextmanager