Skip to content

Commit

Permalink
find the sample schema file depending on how sphinx is invoked
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
  • Loading branch information
dhellmann committed Jun 15, 2019
1 parent 1f9fc2f commit 5dbd8ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@


def setup(app):
schema_file = 'docs/sampledata.sql'
if os.path.exists('sampledata.sql'):
schema_file = 'sampledata.sql'
else:
schema_file = 'docs/sampledata.sql'
db_file = '/tmp/sampledata.db'
print('Initializing sample database {} with {} from {}'.format(
db_file, schema_file, os.getcwd()))
Expand Down

0 comments on commit 5dbd8ca

Please sign in to comment.