Skip to content

Commit

Permalink
Use abs path in gen2 butler conversion constructor
Browse files Browse the repository at this point in the history
Some other parts of repo conversion change the working
directory to the gen3 butler so without this the user is
required to use an absolute path to specify their gen2
repo location.
  • Loading branch information
timj committed Jun 15, 2020
1 parent 9d4b492 commit 54006f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/obs/base/gen2to3/repoConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from collections import defaultdict
from abc import ABC, abstractmethod
import fnmatch
import os.path
import re
from typing import (
Dict,
Expand Down Expand Up @@ -184,7 +185,8 @@ class RepoConverter(ABC):
task : `ConvertRepoTask`
Task instance that is using this helper object.
root : `str`
Root of the Gen2 repo being converted.
Root of the Gen2 repo being converted. Will be converted to an
absolute path, resolving symbolic links and ``~``, if necessary.
collections : `list` of `str`
Gen3 collections with which all converted datasets should be
associated.
Expand All @@ -205,7 +207,7 @@ class RepoConverter(ABC):
def __init__(self, *, task: ConvertRepoTask, root: str, run: Optional[str],
subset: Optional[ConversionSubset] = None):
self.task = task
self.root = root
self.root = os.path.realpath(os.path.expanduser(root))
self.subset = subset
self._run = run
self._repoWalker = None # Created in prep
Expand Down

0 comments on commit 54006f2

Please sign in to comment.