Remove hardcoded data path
Use the conf setting instead. Original Change-Id: I3350d1c23201d80941699690a522c1727acbbc3e Change-Id: Ibf262dff7c1371c2a7088d6d1dcd03faf8713912
This commit is contained in:
parent
d66c70d72c
commit
31782d7949
@ -12,13 +12,16 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
|
||||
from ciwatch import db
|
||||
from ciwatch.events import parse_json_event, add_event_to_db
|
||||
from ciwatch.log import DATA_DIR
|
||||
|
||||
|
||||
def get_data():
|
||||
data = []
|
||||
with open('/var/data/third-party-ci.log') as file_:
|
||||
with open(os.path.join(DATA_DIR, 'third-party-ci.log')) as file_:
|
||||
for line in file_:
|
||||
event = parse_json_event(line)
|
||||
if event is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user