Skip to content

Commit a6157e9

Browse files
authored
Merge pull request #185 from stu-code/master
Fixed score code gen bug
2 parents 33a8026 + 692604c commit a6157e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/sasctl/pzmm/write_score_code.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,18 +451,22 @@ def _write_imports(
451451

452452
try:
453453
if current_session().version_info() != 3.5:
454-
self.score_code += "import settings\n\n"
454+
cls.score_code += "import settings\n\n"
455+
455456
"""
456457
import settings
457458
458459
459460
"""
461+
460462
except AttributeError:
461463
warn(
462464
"No current session connection was found to a SAS Viya server. Score "
463465
"code will be written under the assumption that the target server is "
464466
"SAS Viya 4."
465467
)
468+
cls.score_code += "import settings\n\n"
469+
466470

467471
if mojo_model or binary_h2o_model:
468472
self.score_code += "import h2o\n\nh2o.init()\n\n"

0 commit comments

Comments
 (0)