From 213dac460ae1c7ab9e743940a58b3d6eb22284ab Mon Sep 17 00:00:00 2001 From: Alexandre ZANNI <16578570+noraj@users.noreply.github.com> Date: Mon, 5 Dec 2022 15:57:36 +0100 Subject: [PATCH] fix relative file open (#57) fix #56 --- clairvoyance/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clairvoyance/cli.py b/clairvoyance/cli.py index d357182..d50eec5 100644 --- a/clairvoyance/cli.py +++ b/clairvoyance/cli.py @@ -2,6 +2,7 @@ import json import logging import sys +import os from typing import Dict, List, Optional from clairvoyance import graphql, oracle @@ -30,7 +31,8 @@ def setup_context( def load_default_wordlist() -> List[str]: - with open('clairvoyance/wordlist.txt', 'r', encoding='utf-8') as f: + wl = os.path.join(os.path.dirname(__file__), 'wordlist.txt') + with open(wl, 'r', encoding='utf-8') as f: return [w.strip() for w in f.readlines() if w.strip()]