Skip to content

Commit

Permalink
refactor: change warnings to print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Muldrew committed May 1, 2020
1 parent d5692ce commit 8362280
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions powersimdata/design/clean_capacity_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import json
import os
import pickle
import warnings
from collections import defaultdict

from abc import ABC, abstractmethod
Expand Down Expand Up @@ -164,10 +163,9 @@ def create_scale_factor_table(self, base_grid=None, gen_capacity=None):
print('No loadzone %s in grid!' % load_zone)
continue
if base_target_resource_cap <= 0:
warnings.warn(
f"Base grid capacity is zero for load zone "
f"{load_zone} and resource {res} and cannot be "
f"scaled!")
print('Base grid capacity is zero for load zone {0} '
'and resource {1} and cannot be '
'scaled!'.format(load_zone, res))
else:
scale_factor = row[res] / base_target_resource_cap
if abs(scale_factor - 1.0) > 0.001:
Expand Down

0 comments on commit 8362280

Please sign in to comment.