Python: fix up testing script

- Didn't run at all (at least since v3.1) because of mismatch between
  GlobalStorage constructor arguments and use; special-case None
  in the C++ code to allocate a new GlobalStorage object.
This commit is contained in:
Adriaan de Groot 2017-08-15 13:49:43 +02:00
parent f509000215
commit d4c714c400
2 changed files with 12 additions and 2 deletions

View file

@ -4,6 +4,7 @@
# === This file is part of Calamares - <http://github.com/calamares> ===
#
# Copyright 2014, Teo Mrnjavac <teo@kde.org>
# Copyright 2017, Adriaan de Groot <groot@kde.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -81,7 +82,9 @@ def main():
print("Only Python jobs can be tested.")
return 1
libcalamares.globalstorage = libcalamares.GlobalStorage()
# Parameter None creates a new, empty GlobalStorage
libcalamares.globalstorage = libcalamares.GlobalStorage(None)
libcalamares.globalstorage.insert("testing", True)
# if a file for simulating globalStorage contents is provided, load it
if args.globalstorage_yaml: