EVOLUTION-MANAGER
Edit File: SizeString.cpython-36.opt-1.pyc
3 x?ag_ � @ s\ d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmZ G d d � d e �Z dS )zv SizeString - LVM-style size strings $Id: //eng/vdo-releases/aluminum/src/python/vdo/vdomgmnt/SizeString.py#1 $ � )�absolute_import)�division)�print_function)�unicode_literalsN� )� Constantsc @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zed(d)� �Zd*S )+� SizeStringa� Represents the size of an object such as a disk partition. Conversions are provided to and from suffixed size strings as used by LVM commands like lvcreate(8). These strings consist of a (possibly floating-point) number followed by an optional unit suffix: B (bytes), S (512-byte sectors), and KMGTPE for kilobytes through exabytes, respectively. Suffixes are not case-sensitive; the default unit is Megabytes. Currently, we reject negative sizes. Unlike some (but not all) LVM commands we do not interpret the upper-case version of a suffix as a power of ten. Attributes: _originalString (str): the original string we were constructed with, mainly used for debugging _bytes (int): the value of this object in bytes c C s t d�}| jt|� |_|S )N� )r �_bytes�int)�self�rhsZretval� r � /usr/lib/python3.6/SizeString.py�__add__8 s zSizeString.__add__c C s | j dkS )Nr )r )r r r r �__bool__>