75f5645
remove duplicate code and create class Signed-off-by: Onuralp SEZER <thunderbirdtr@fedoraproject.org>